diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Azure.AI.Language.Conversations.Authoring.sln b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Azure.AI.Language.Conversations.Authoring.sln new file mode 100644 index 000000000000..0b78b10ce73c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Azure.AI.Language.Conversations.Authoring.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Conversations.Authoring", "src\Azure.AI.Language.Conversations.Authoring.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Conversations.Authoring.Tests", "tests\Azure.AI.Language.Conversations.Authoring.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 + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {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 + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.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/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Directory.Build.props b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md new file mode 100644 index 000000000000..3dbd80f7e359 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Language.Conversations.Authoring client library for .NET + +Azure.AI.Language.Conversations.Authoring 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/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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.AI.Language.Conversations.Authoring --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. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## 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/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/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/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/README.png) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs new file mode 100644 index 000000000000..7c36879a4169 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.net8.0.cs @@ -0,0 +1,1574 @@ +namespace Azure.AI.Language.Conversations.Authoring +{ + public partial class AnalyzeConversationAuthoring + { + protected AnalyzeConversationAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignedResourceDeploymentsAsync(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedLanguagesAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedLanguagesAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingConfigVersionsAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingConfigVersionsAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Conversations.Authoring.AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } +} +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public static partial class AILanguageConversationsAuthoringModelFactory + { + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError AuthoringConversationsError(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity ConversationExportedEntity(string category = null, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? compositionSetting = default(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting?), Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList list = null, System.Collections.Generic.IEnumerable prebuilts = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex regex = null, System.Collections.Generic.IEnumerable requiredComponents = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance ConversationExportedUtterance(System.Collections.Generic.IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary EvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary entitiesEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary intentsEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration ExportedLuisOrchestration(System.Guid appId = default(System.Guid), string appVersion = null, string slotName = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType), Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary IntentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary intents = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent OrchestrationExportedIntent(Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails orchestration = null, string category = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities PrebuiltEntities(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages SupportedLanguages(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions TrainingConfigVersions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode), Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode?), Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult entitiesResult = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult intentsResult = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedResourceDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedResourceDeploymentsMetadata() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsError() { } + public Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting RequireExactOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting ReturnLongestOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting 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.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedEntity(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex Regex { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredComponents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedIntent(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedProjectAssets() { } + public System.Collections.Generic.IList Entities { get { throw null; } } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntitiesEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode 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.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind 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.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluation { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestration(string projectName, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration ConversationOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegex() { } + public System.Collections.Generic.IList Expressions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegexExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegexExpression() { } + public string Language { get { throw null; } set { } } + public string RegexKey { get { throw null; } set { } } + public string RegexPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestration(System.Guid appId) { } + public System.Guid AppId { get { throw null; } } + public string AppVersion { get { throw null; } set { } } + public string SlotName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration LuisOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedOrchestrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedOrchestrationDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExportedProjectFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExportedProjectFormat(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Luis { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat 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.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestration(string projectName) { } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedUtteranceEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedUtteranceEntityLabel(string category, int offset, int length) { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode 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.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentsEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentsEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Intents { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.JobStatus 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.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedIntent(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails Orchestration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedProjectAssets() { } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntities() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind CustomConversationSummarization { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Orchestration { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind 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.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings(float confidenceThreshold) { } + public float ConfidenceThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Language.Conversations.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguages : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguages() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersions() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode) { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode TrainingMode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? TrainingMode { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TrainingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrainingMode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Advanced { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Standard { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode 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.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.TrainingMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntitiesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntitiesEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntityEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntityEvaluationResult() { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEvaluationResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult EntitiesResult { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult IntentsResult { get { throw null; } } + public string Language { get { throw null; } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceIntentsEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceIntentsEvaluationResult() { } + public string ExpectedIntent { get { throw null; } } + public string PredictedIntent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs new file mode 100644 index 000000000000..7c36879a4169 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/api/Azure.AI.Language.Conversations.Authoring.netstandard2.0.cs @@ -0,0 +1,1574 @@ +namespace Azure.AI.Language.Conversations.Authoring +{ + public partial class AnalyzeConversationAuthoring + { + protected AnalyzeConversationAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignedResourceDeployments(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignedResourceDeploymentsAsync(int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSupportedLanguages(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedLanguagesAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedLanguagesAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingConfigVersions(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingConfigVersionsAsync(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingConfigVersionsAsync(string projectKind, int? top = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.ExportedProject body, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat? exportedProjectFormat = default(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string exportedProjectFormat = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Conversations.Authoring.AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } +} +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public static partial class AILanguageConversationsAuthoringModelFactory + { + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError AuthoringConversationsError(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity ConversationExportedEntity(string category = null, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? compositionSetting = default(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting?), Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList list = null, System.Collections.Generic.IEnumerable prebuilts = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex regex = null, System.Collections.Generic.IEnumerable requiredComponents = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance ConversationExportedUtterance(System.Collections.Generic.IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary EvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary entitiesEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary intentsEvaluation = null, Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration ExportedLuisOrchestration(System.Guid appId = default(System.Guid), string appVersion = null, string slotName = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType), Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary IntentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluationSummary(Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary intents = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent OrchestrationExportedIntent(Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails orchestration = null, string category = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities PrebuiltEntities(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind), Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages SupportedLanguages(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions TrainingConfigVersions(System.Collections.Generic.IEnumerable value = null, string nextLink = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode), Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? trainingMode = default(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode?), Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Conversations.Authoring.Models.JobStatus status = default(Azure.AI.Language.Conversations.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult entitiesResult = null, Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult intentsResult = null) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedResourceDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedResourceDeploymentsMetadata() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AssignedResourceDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsError() { } + public Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthoringConversationsWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthoringConversationsWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.AuthoringConversationsWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting RequireExactOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting ReturnLongestOverlap { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting 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.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting left, Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedEntity(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex Regex { get { throw null; } set { } } + public System.Collections.Generic.IList RequiredComponents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedIntent(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedProjectAssets() { } + public System.Collections.Generic.IList Entities { get { throw null; } } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConversationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConversationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ConversationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind projectKind, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.DeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntitiesEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode 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.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind 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.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind left, Azure.AI.Language.Conversations.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.EntitiesEvaluationSummary EntitiesEvaluation { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary IntentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestration(string projectName, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedConversationOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedConversationOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration conversationOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestration ConversationOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedConversationOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegex() { } + public System.Collections.Generic.IList Expressions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityRegexExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityRegexExpression() { } + public string Language { get { throw null; } set { } } + public string RegexKey { get { throw null; } set { } } + public string RegexPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntityRegexExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestration(System.Guid appId) { } + public System.Guid AppId { get { throw null; } } + public string AppVersion { get { throw null; } set { } } + public string SlotName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedLuisOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedLuisOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration luisOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestration LuisOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedLuisOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedOrchestrationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedOrchestrationDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExportedProjectFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExportedProjectFormat(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat Luis { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat 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.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat left, Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestration(string projectName) { } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedQuestionAnsweringOrchestrationDetails : Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedQuestionAnsweringOrchestrationDetails(Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) { } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedQuestionAnsweringOrchestrationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedUtteranceEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedUtteranceEntityLabel(string category, int offset, int length) { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportedUtteranceEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode 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.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IntentsEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IntentsEvaluationSummary() { } + public Azure.AI.Language.Conversations.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Intents { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.IntentsEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.JobStatus 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.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.JobStatus left, Azure.AI.Language.Conversations.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedIntent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedIntent(string category) { } + public string Category { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ExportedOrchestrationDetails Orchestration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedProjectAssets : Azure.AI.Language.Conversations.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedProjectAssets() { } + public System.Collections.Generic.IList Intents { get { throw null; } } + public System.Collections.Generic.IList Utterances { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OrchestrationExportedUtterance : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OrchestrationExportedUtterance(string text, string intent) { } + public string Dataset { get { throw null; } set { } } + public string Intent { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.OrchestrationExportedUtterance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntities() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Conversation { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind CustomConversationSummarization { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.ProjectKind Orchestration { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind 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.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.ProjectKind left, Azure.AI.Language.Conversations.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings(float confidenceThreshold) { } + public float ConfidenceThreshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Language.Conversations.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.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.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.StringIndexType left, Azure.AI.Language.Conversations.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguages : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguages() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SupportedLanguages System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersions() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingConfigVersions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode trainingMode) { } + public Azure.AI.Language.Conversations.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode TrainingMode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingMode? TrainingMode { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TrainingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TrainingMode(string value) { throw null; } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Advanced { get { throw null; } } + public static Azure.AI.Language.Conversations.Authoring.Models.TrainingMode Standard { get { throw null; } } + public bool Equals(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode 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.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public static implicit operator Azure.AI.Language.Conversations.Authoring.Models.TrainingMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Conversations.Authoring.Models.TrainingMode left, Azure.AI.Language.Conversations.Authoring.Models.TrainingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntitiesEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntitiesEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEntityEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEntityEvaluationResult() { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntityEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceEvaluationResult() { } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceEntitiesEvaluationResult EntitiesResult { get { throw null; } } + public Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult IntentsResult { get { throw null; } } + public string Language { get { throw null; } } + public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UtteranceIntentsEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UtteranceIntentsEvaluationResult() { } + public string ExpectedIntent { get { throw null; } } + public string PredictedIntent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Conversations.Authoring.Models.UtteranceIntentsEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj new file mode 100644 index 000000000000..56bcc140bc62 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Azure.AI.Language.Conversations.Authoring.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.AI.Language.Conversations.Authoring client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Language.Conversations.Authoring for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Language.Conversations.Authoring + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs new file mode 100644 index 000000000000..88f288af003c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringClientBuilderExtensions.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.Language.Conversations.Authoring; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AILanguageConversationsAuthoringClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new AuthoringClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthoringClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs new file mode 100644 index 000000000000..3c4370eb609e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AILanguageConversationsAuthoringModelFactory.cs @@ -0,0 +1,961 @@ +// 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.Language.Conversations.Authoring.Models +{ + /// Model factory for models. + public static partial class AILanguageConversationsAuthoringModelFactory + { + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project last trained datetime. + /// Represents the project last deployed datetime. + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static ProjectMetadata ProjectMetadata(DateTimeOffset createdDateTime = default, DateTimeOffset lastModifiedDateTime = default, DateTimeOffset? lastTrainedDateTime = null, DateTimeOffset? lastDeployedDateTime = null, ProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// 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 AuthoringConversationsError AuthoringConversationsError(ErrorCode code = default, string message = null, string target = null, IEnumerable details = null, InnerErrorModel innererror = null) + { + details ??= new List(); + + return new AuthoringConversationsError( + code, + message, + target, + details?.ToList(), + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// A new instance for mocking. + public static InnerErrorModel InnerErrorModel(InnerErrorCode code = default, string message = null, IReadOnlyDictionary details = null, string target = null, InnerErrorModel innererror = null) + { + details ??= new Dictionary(); + + return new InnerErrorModel( + code, + message, + details, + target, + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static CreateProjectDetails CreateProjectDetails(ProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new CreateProjectDetails( + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 . + /// + /// A new instance for mocking. + public static ExportedProject ExportedProject(string projectFileVersion = null, StringIndexType stringIndexType = default, CreateProjectDetails metadata = null, ExportedProjectAssets assets = null) + { + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The category of the entity. + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The regex component of the entity. + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + /// A new instance for mocking. + public static ConversationExportedEntity ConversationExportedEntity(string category = null, CompositionSetting? compositionSetting = null, ExportedEntityList list = null, IEnumerable prebuilts = null, ExportedEntityRegex regex = null, IEnumerable requiredComponents = null) + { + prebuilts ??= new List(); + requiredComponents ??= new List(); + + return new ConversationExportedEntity( + category, + compositionSetting, + list, + prebuilts?.ToList(), + regex, + requiredComponents?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity labels of the utterance. + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static ConversationExportedUtterance ConversationExportedUtterance(IEnumerable entities = null, string text = null, string language = null, string intent = null, string dataset = null) + { + entities ??= new List(); + + return new ConversationExportedUtterance( + entities?.ToList(), + text, + language, + intent, + dataset, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 intent category. + /// A new instance for mocking. + public static OrchestrationExportedIntent OrchestrationExportedIntent(ExportedOrchestrationDetails orchestration = null, string category = null) + { + return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Conversational project target details. + /// A new instance for mocking. + public static ExportedConversationOrchestrationDetails ExportedConversationOrchestrationDetails(ExportedConversationOrchestration conversationOrchestration = null) + { + return new ExportedConversationOrchestrationDetails(OrchestrationTargetProjectKind.Conversation, serializedAdditionalRawData: null, conversationOrchestration); + } + + /// Initializes a new instance of . + /// The LUIS application target details. + /// A new instance for mocking. + public static ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration = null) + { + return new ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind.Luis, serializedAdditionalRawData: null, luisOrchestration); + } + + /// Initializes a new instance of . + /// The LUIS application ID. + /// The targeted version Id. + /// The targeted slot name. + /// A new instance for mocking. + public static ExportedLuisOrchestration ExportedLuisOrchestration(Guid appId = default, string appVersion = null, string slotName = null) + { + return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Question Answering project details. + /// A new instance for mocking. + public static ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = null) + { + return new ExportedQuestionAnsweringOrchestrationDetails(OrchestrationTargetProjectKind.QuestionAnswering, serializedAdditionalRawData: null, questionAnsweringOrchestration); + } + + /// Initializes a new instance of . + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static OrchestrationExportedUtterance OrchestrationExportedUtterance(string text = null, string language = null, string intent = null, string dataset = null) + { + return new OrchestrationExportedUtterance(text, language, intent, dataset, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + /// Represents the mode of the training operation. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// A new instance for mocking. + public static TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, TrainingMode trainingMode = default, EvaluationDetails evaluationOptions = null) + { + return new TrainingJobDetails(modelLabel, trainingConfigVersion, trainingMode, evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the mode of the training operation. + /// Represents the model training status. + /// Represents model evaluation status. + /// Represents the estimated end date time for training and evaluation. + /// A new instance for mocking. + public static TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, TrainingMode? trainingMode = null, SubTrainingJobState trainingStatus = null, SubTrainingJobState evaluationStatus = null, DateTimeOffset? estimatedEndDateTime = null) + { + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingMode, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// A new instance for mocking. + public static SubTrainingJobState SubTrainingJobState(int percentComplete = default, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, JobStatus status = default) + { + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// A new instance for mocking. + public static TrainingJobState TrainingJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, TrainingJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// A new instance for mocking. + public static AuthoringConversationsWarning AuthoringConversationsWarning(string code = null, string message = null) + { + return new AuthoringConversationsWarning(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static CopyProjectJobState CopyProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// A new instance for mocking. + public static ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default, string modelTrainingConfigVersion = null, IEnumerable assignedResources = null) + { + assignedResources ??= new List(); + + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// A new instance for mocking. + public static DeploymentResource DeploymentResource(string resourceId = null, string region = null) + { + return new DeploymentResource(resourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// A new instance for mocking. + public static CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, IEnumerable assignedResourceIds = null) + { + assignedResourceIds ??= new List(); + + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentJobState DeploymentJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// A new instance for mocking. + public static ExportProjectJobState ExportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, string resultUrl = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + resultUrl, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ImportProjectJobState ImportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// A new instance for mocking. + public static ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, int lastTrainingDurationInSeconds = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null, bool hasSnapshot = default) + { + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// A new instance for mocking. + public static EvaluationJobResult EvaluationJobResult(EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = default) + { + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// A new instance for mocking. + public static EvaluationJobState EvaluationJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, EvaluationJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the utterance text. + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// A new instance for mocking. + public static UtteranceEvaluationResult UtteranceEvaluationResult(string text = null, string language = null, UtteranceEntitiesEvaluationResult entitiesResult = null, UtteranceIntentsEvaluationResult intentsResult = null) + { + return new UtteranceEvaluationResult(text, language, entitiesResult, intentsResult, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// A new instance for mocking. + public static UtteranceEntitiesEvaluationResult UtteranceEntitiesEvaluationResult(IEnumerable expectedEntities = null, IEnumerable predictedEntities = null) + { + expectedEntities ??= new List(); + predictedEntities ??= new List(); + + return new UtteranceEntitiesEvaluationResult(expectedEntities?.ToList(), predictedEntities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// A new instance for mocking. + public static UtteranceEntityEvaluationResult UtteranceEntityEvaluationResult(string category = null, int offset = default, int length = default) + { + return new UtteranceEntityEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// A new instance for mocking. + public static UtteranceIntentsEvaluationResult UtteranceIntentsEvaluationResult(string expectedIntent = null, string predictedIntent = null) + { + return new UtteranceIntentsEvaluationResult(expectedIntent, predictedIntent, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Contains the data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// The options that were used while running the evaluation. + /// A new instance for mocking. + public static EvaluationSummary EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation = null, IntentsEvaluationSummary intentsEvaluation = null, EvaluationDetails evaluationOptions = null) + { + return new EvaluationSummary(entitiesEvaluation, intentsEvaluation, evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static EntitiesEvaluationSummary EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary entities = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + entities ??= new Dictionary(); + + return new EntitiesEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrix ConfusionMatrix(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrix(additionalProperties); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrixRow ConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrixRow(additionalProperties); + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// A new instance for mocking. + public static ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = default, float rawValue = default) + { + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static EntityEvaluationSummary EntityEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static IntentsEvaluationSummary IntentsEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary intents = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + intents ??= new Dictionary(); + + return new IntentsEvaluationSummary( + confusionMatrix, + intents, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static IntentEvaluationSummary IntentEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new IntentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// A new instance for mocking. + public static AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) + { + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentResourcesJobState DeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// The next page link. + /// A new instance for mocking. + public static AssignedResourceDeploymentsMetadata AssignedResourceDeploymentsMetadata(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new AssignedResourceDeploymentsMetadata(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// A new instance for mocking. + public static AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, IEnumerable deploymentsMetadata = null) + { + deploymentsMetadata ??= new List(); + + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// A new instance for mocking. + public static AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default) + { + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of the languages. + /// The next page link. + /// A new instance for mocking. + public static SupportedLanguages SupportedLanguages(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new SupportedLanguages(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) + { + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The supported prebuilt entities. + /// The next page link. + /// A new instance for mocking. + public static PrebuiltEntities PrebuiltEntities(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new PrebuiltEntities(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// A new instance for mocking. + public static PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) + { + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of the training config versions. + /// The next page link. + /// A new instance for mocking. + public static TrainingConfigVersions TrainingConfigVersions(IEnumerable value = null, string nextLink = null) + { + value ??= new List(); + + return new TrainingConfigVersions(value?.ToList(), nextLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// A new instance for mocking. + public static TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, DateTimeOffset modelExpirationDate = default) + { + return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// A new instance for mocking. + public static ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastExportedModelDateTime = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null) + { + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ExportedModelJobState ExportedModelJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs new file mode 100644 index 000000000000..2cb83fc5d18d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs @@ -0,0 +1,6630 @@ +// 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; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.AI.Language.Conversations.Authoring.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Conversations.Authoring +{ + // Data plane generated sub-client. + /// The AnalyzeConversationAuthoring sub-client. + public partial class AnalyzeConversationAuthoring + { + 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; + + /// 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 AnalyzeConversationAuthoring for mocking. + protected AnalyzeConversationAuthoring() + { + } + + /// Initializes a new instance of AnalyzeConversationAuthoring. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// The API version to use for this operation. + internal AnalyzeConversationAuthoring(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectAsync(projectName, context).ConfigureAwait(false); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProject(projectName, context); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project 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 GetProjectAsync(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project 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 GetProject(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new project or updates an existing one. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project 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 response returned from the service. + /// + public virtual async Task CreateProjectAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new project or updates an existing one. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project 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 response returned from the service. + /// + public virtual Response CreateProject(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CopyProjectAuthorizationAsync(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CopyProjectAuthorizationAsync(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CopyProjectAuthorization(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CopyProjectAuthorization(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure 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 new project 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 response returned from the service. + /// + public virtual async Task CopyProjectAuthorizationAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure 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 new project 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 response returned from the service. + /// + public virtual Response CopyProjectAuthorization(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCopyProjectStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCopyProjectStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCopyProjectStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCopyProjectStatus(projectName, jobId, context); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetCopyProjectStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetCopyProjectStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentAsync(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentAsync(projectName, deploymentName, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeployment(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeployment(projectName, deploymentName, context); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetDeploymentAsync(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetDeployment(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentDeleteFromResourcesStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentDeleteFromResourcesStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSwapDeploymentsStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSwapDeploymentsStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSwapDeploymentsStatus(projectName, jobId, context); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetSwapDeploymentsStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetSwapDeploymentsStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportStatus(projectName, jobId, context); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetImportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetImportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetImportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetImportStatus(projectName, jobId, context); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetImportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetImportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainedModelAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainedModel(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainedModel(projectName, trainedModelLabel, context); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a trained 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. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a trained 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. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainedModel(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, 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 an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, 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 an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteTrainedModel(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEvaluationStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEvaluationStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetModelEvaluationSummaryAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetModelEvaluationSummary(projectName, trainedModelLabel, context); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetModelEvaluationSummary(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLoadSnapshotStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLoadSnapshotStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetAssignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing unassign deployment resources job. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetUnassignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing unassign deployment resources job. + /// The name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetUnassignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(DeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetUnassignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainingStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainingStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(projectName, jobId, context); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainingStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainingStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectDeletionStatusAsync(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectDeletionStatusAsync(jobId, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProjectDeletionStatus(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProjectDeletionStatus(jobId, context); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatusAsync(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatus(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetAssignedResourceDeploymentsAsync(int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignedResourceDeploymentsAsync(top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(AssignedResourceDeploymentsMetadata.FromResponse(response), response); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetAssignedResourceDeployments(int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignedResourceDeployments(top, skip, maxpagesize, context); + return Response.FromValue(AssignedResourceDeploymentsMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetAssignedResourceDeploymentsAsync(int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignedResourceDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignedResourceDeploymentsRequest(top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetAssignedResourceDeployments(int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetAssignedResourceDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignedResourceDeploymentsRequest(top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetSupportedLanguagesAsync(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSupportedLanguagesAsync(projectKind.ToString(), top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(SupportedLanguages.FromResponse(response), response); + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetSupportedLanguages(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSupportedLanguages(projectKind.ToString(), top, skip, maxpagesize, context); + return Response.FromValue(SupportedLanguages.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the supported languages for the given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedLanguagesAsync(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedLanguages"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedLanguagesRequest(projectKind, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the supported languages for the given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedLanguages(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedLanguages"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedLanguagesRequest(projectKind, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetSupportedPrebuiltEntitiesAsync(string language = null, string multilingual = null, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSupportedPrebuiltEntitiesAsync(language, multilingual, top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(PrebuiltEntities.FromResponse(response), response); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetSupportedPrebuiltEntities(string language = null, string multilingual = null, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSupportedPrebuiltEntities(language, multilingual, top, skip, maxpagesize, context); + return Response.FromValue(PrebuiltEntities.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedPrebuiltEntitiesAsync(string language, string multilingual, int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedPrebuiltEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedPrebuiltEntitiesRequest(language, multilingual, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 language to get supported prebuilt entities for. Required if multilingual is false. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Whether to get the support prebuilt entities for multilingual or monolingual projects. If true, the language parameter is ignored. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetSupportedPrebuiltEntities(string language, string multilingual, int? top, int? skip, int? maxpagesize, RequestContext context) + { + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetSupportedPrebuiltEntities"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSupportedPrebuiltEntitiesRequest(language, multilingual, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual async Task> GetTrainingConfigVersionsAsync(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingConfigVersionsAsync(projectKind.ToString(), top, skip, maxpagesize, context).ConfigureAwait(false); + return Response.FromValue(TrainingConfigVersions.FromResponse(response), response); + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// The cancellation token to use. + /// + public virtual Response GetTrainingConfigVersions(ProjectKind projectKind, int? top = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingConfigVersions(projectKind.ToString(), top, skip, maxpagesize, context); + return Response.FromValue(TrainingConfigVersions.FromResponse(response), response); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetTrainingConfigVersionsAsync(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingConfigVersions"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingConfigVersionsRequest(projectKind, top, skip, maxpagesize, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// The maximum number of resources to return from the collection. + /// An offset into the collection of the first resource to be returned. + /// The maximum number of resources to include in a single response. + /// 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 GetTrainingConfigVersions(string projectKind, int? top = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetTrainingConfigVersions"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingConfigVersionsRequest(projectKind, top, skip, maxpagesize, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModel(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModel(projectName, exportedModelName, context); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModelAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModel(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelJobStatusAsync(projectName, exportedModelName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelJobStatus(projectName, exportedModelName, jobId, context); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetProjects(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetProjects(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// 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 GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// 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 GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", context); + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 DeleteProjectAsync(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil).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 a project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 DeleteProject(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Copies an existing project to another Azure resource. + /// 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 name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CopyProjectAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Copies an existing project to another Azure resource. + /// 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 name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CopyProject(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Copies an existing project to another Azure 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. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 CopyProjectAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Copies an existing project to another Azure 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. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 CopyProject(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to export a project's data. + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The format of the exported project file to use. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, ExportedProjectFormat? exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return await ExportAsync(waitUntil, projectName, stringIndexType.ToString(), exportedProjectFormat?.ToString(), assetKind, trainedModelLabel, context).ConfigureAwait(false); + } + + /// Triggers a job to export a project's data. + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The format of the exported project file to use. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, ExportedProjectFormat? exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return Export(waitUntil, projectName, stringIndexType.ToString(), exportedProjectFormat?.ToString(), assetKind, trainedModelLabel, context); + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// 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 ExportAsync(WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// 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 Export(WaitUntil waitUntil, string projectName, string stringIndexType, string exportedProjectFormat = null, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// 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 name of the project to use. + /// The project data to import. + /// The format of the exported project file to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, ExportedProject body, ExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await ImportAsync(waitUntil, projectName, content, exportedProjectFormat?.ToString(), context).ConfigureAwait(false); + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// 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 name of the project to use. + /// The project data to import. + /// The format of the exported project file to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, ExportedProject body, ExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return Import(waitUntil, projectName, content, exportedProjectFormat?.ToString(), context); + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// 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 ImportAsync(WaitUntil waitUntil, string projectName, RequestContent content, string exportedProjectFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the exported project file to use. Allowed values: "Conversation" | "Luis". + /// 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 Import(WaitUntil waitUntil, string projectName, RequestContent content, string exportedProjectFormat = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a training job for a project. + /// 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 name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await TrainAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.Train"); + } + + /// Triggers a training job for a project. + /// 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 name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = Train(waitUntil, projectName, content, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.Train"); + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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> TrainAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 Train(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Swaps two existing deployments with each other. + /// 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 name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await SwapDeploymentsAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Swaps two existing deployments with each other. + /// 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 name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return SwapDeployments(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// 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 SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// 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 SwapDeployments(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new deployment or replaces an existing one. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeployProjectAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Creates a new deployment or replaces an existing one. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeployProject(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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 a project deployment. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteDeploymentAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil).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 a project deployment. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteDeployment(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a project deployment from the specified assigned resources. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeleteDeploymentFromResourcesAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Deletes a project deployment from the specified assigned resources. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeleteDeploymentFromResources(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers evaluation operation on a trained 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. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await EvaluateModelAsync(waitUntil, projectName, trainedModelLabel, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel"); + } + + /// Triggers evaluation operation on a trained 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. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = EvaluateModel(waitUntil, projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel"); + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained 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 name of the project to use. + /// The trained model label. + /// 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. + /// or 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> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained 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 name of the project to use. + /// The trained model label. + /// 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. + /// or 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 EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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] Restores the snapshot of this trained model to be the current working directory of the project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 LoadSnapshotAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil).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] Restores the snapshot of this trained model to be the current working directory of the project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 LoadSnapshot(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// 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 name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await AssignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// 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 name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return AssignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// 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 AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// 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 AssignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// 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 name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await UnassignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// 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 name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return UnassignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// 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 UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// 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 UnassignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a cancellation for a running training job. + /// 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 name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await CancelTrainingJobAsync(waitUntil, projectName, jobId, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob"); + } + + /// Triggers a cancellation for a running training job. + /// 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 name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = CancelTrainingJob(waitUntil, projectName, jobId, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob"); + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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 an existing exported model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).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 an existing exported model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new exported model or replaces an existing one. + /// 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 name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CreateOrUpdateExportedModelAsync(waitUntil, projectName, exportedModelName, content, context).ConfigureAwait(false); + } + + /// Creates a new exported model or replaces an existing one. + /// 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 name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CreateOrUpdateExportedModel(waitUntil, projectName, exportedModelName, content, context); + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported 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. + /// or 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 CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported 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. + /// or 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 CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AnalyzeConversationAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AnalyzeConversationAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetProjectsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateProjectRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteProjectRequest(string projectName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCopyProjectAuthorizationRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:authorize-copy", 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 CreateCopyProjectRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:copy", 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 CreateExportRequest(string projectName, string stringIndexType, string exportedProjectFormat, string assetKind, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:export", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (exportedProjectFormat != null) + { + uri.AppendQuery("format", exportedProjectFormat, true); + } + if (assetKind != null) + { + uri.AppendQuery("assetKind", assetKind, true); + } + if (trainedModelLabel != null) + { + uri.AppendQuery("trainedModelLabel", trainedModelLabel, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateImportRequest(string projectName, RequestContent content, string exportedProjectFormat, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:import", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (exportedProjectFormat != null) + { + uri.AppendQuery("format", exportedProjectFormat, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateTrainRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:train", 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 CreateGetCopyProjectStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/copy/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSwapDeploymentsRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/:swap", 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 CreateGetDeploymentRequest(string projectName, string deploymentName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeployProjectRequest(string projectName, string deploymentName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + 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 CreateDeleteDeploymentRequest(string projectName, string deploymentName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteDeploymentFromResourcesRequest(string projectName, string deploymentName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/:delete-from-resources", 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 CreateGetDeploymentDeleteFromResourcesStatusRequest(string projectName, string deploymentName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/delete-from-resources/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentStatusRequest(string projectName, string deploymentName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSwapDeploymentsStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/swap/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/export/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetImportStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/import/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteTrainedModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateEvaluateModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:evaluate", 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 CreateLoadSnapshotRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:load-snapshot", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEvaluationStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluate/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsRequest(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/result", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationSummaryRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/summary-result", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLoadSnapshotStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/load-snapshot/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAssignDeploymentResourcesRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:assign", 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 CreateUnassignDeploymentResourcesRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:unassign", 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 CreateGetAssignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/assign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetUnassignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/unassign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCancelTrainingJobRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/:cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectDeletionStatusRequest(string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/global/deletion-jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsRequest(int? top, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/global/deployments/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesRequest(string projectKind, int? top, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/global/languages", false); + uri.AppendQuery("projectKind", projectKind, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesRequest(string language, string multilingual, int? top, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/global/prebuilt-entities", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (language != null) + { + uri.AppendQuery("language", language, true); + } + if (multilingual != null) + { + uri.AppendQuery("multilingual", multilingual, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsRequest(string projectKind, int? top, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/global/training-config-versions", false); + uri.AppendQuery("projectKind", projectKind, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelRequest(string projectName, string exportedModelName, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteExportedModelRequest(string projectName, string exportedModelName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateExportedModelRequest(string projectName, string exportedModelName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + 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 CreateGetExportedModelJobStatusRequest(string projectName, string exportedModelName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-conversations/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsNextPageRequest(string nextLink, string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", 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 _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + + private TrainingJobResult FetchTrainingJobResultFromTrainingJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return TrainingJobResult.DeserializeTrainingJobResult(resultJsonElement); + } + + private EvaluationJobResult FetchEvaluationJobResultFromEvaluationJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return EvaluationJobResult.DeserializeEvaluationJobResult(resultJsonElement); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs new file mode 100644 index 000000000000..9b8fcdf03b96 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Conversations.Authoring +{ + // Data plane generated client. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. + public partial class AuthoringClient + { + 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; + + /// 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 AuthoringClient for mocking. + protected AuthoringClient() + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthoringClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthoringClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthoringClient(Uri endpoint, AzureKeyCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthoringClient(Uri endpoint, TokenCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AnalyzeConversationAuthoring. + /// The API version to use for this operation. + /// is null. + public virtual AnalyzeConversationAuthoring GetAnalyzeConversationAuthoringClient(string apiVersion = "2024-11-15-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new AnalyzeConversationAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.cs new file mode 100644 index 000000000000..1faa972821a7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClientOptions.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.Language.Conversations.Authoring +{ + /// Client options for AuthoringClient. + public partial class AuthoringClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-04-01". + V2023_04_01 = 1, + /// Service version "2023-04-15-preview". + V2023_04_15_Preview = 2, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 3, + } + + internal string Version { get; } + + /// Initializes new instance of AuthoringClientOptions. + public AuthoringClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_04_01 => "2023-04-01", + ServiceVersion.V2023_04_15_Preview => "2023-04-15-preview", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml new file mode 100644 index 000000000000..ad7f0d4545c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml @@ -0,0 +1,5911 @@ + + + + + +This sample shows how to call GetProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> +This sample shows how to call GetProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> + + + +This sample shows how to call GetProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> +This sample shows how to call GetProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> + + + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call GetProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + projectName = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + projectName = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorization. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorization and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> +This sample shows how to call GetDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> + + + +This sample shows how to call GetDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> +This sample shows how to call GetDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeployment and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> +This sample shows how to call GetExportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetExportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> +This sample shows how to call GetExportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> + + + +This sample shows how to call GetExportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetImportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> +This sample shows how to call GetImportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetImportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> +This sample shows how to call GetImportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> + + + +This sample shows how to call GetImportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetImportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> + + + +This sample shows how to call GetTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> +This sample shows how to call GetTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> + + + +This sample shows how to call GetTrainedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call GetTrainedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call DeleteTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> +This sample shows how to call GetEvaluationStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetEvaluationStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummary. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummary and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); +Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> +This sample shows how to call GetTrainingStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(); +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetAssignedResourceDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(); +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetAssignedResourceDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignedResourceDeployments(1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation); +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedLanguages. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages(ProjectKind.Conversation); +]]> +This sample shows how to call GetSupportedLanguages with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedLanguagesAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedLanguages and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +]]> +This sample shows how to call GetSupportedLanguages with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedLanguages("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(); +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(); +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSupportedPrebuiltEntitiesAsync("", "", 1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities(null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSupportedPrebuiltEntities("", "", 1234, 1234, 1234, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation); +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetTrainingConfigVersions. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation); +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingConfigVersionsAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetTrainingConfigVersions and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions("Conversation"); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingConfigVersions("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("nextLink").ToString()); +]]> + + + +This sample shows how to call GetExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> +This sample shows how to call GetExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> +This sample shows how to call GetExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> + + + +This sample shows how to call GetExportedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync()) +{ +} +]]> +This sample shows how to call GetProjectsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjects. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects()) +{ +} +]]> +This sample shows how to call GetProjects with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjectsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjectsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetProjects and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjects with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("")) +{ +} +]]> +This sample shows how to call GetDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("")) +{ +} +]]> +This sample shows how to call GetTrainedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResults. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResults and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) +{ +} +]]> +This sample shows how to call GetDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResources and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResources with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobs. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("")) +{ +} +]]> +This sample shows how to call GetTrainingJobs with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobs and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobs with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("")) +{ +} +]]> +This sample shows how to call GetExportedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call DeleteProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call DeleteProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call ImportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionSetting = CompositionSetting.ReturnLongestOverlap, + List = new ExportedEntityList + { + Sublists = {new ExportedEntitySublist + { + ListKey = "", + Synonyms = {new ExportedEntityListSynonym + { + Language = "", + Values = {""}, + }}, + }}, + }, + Prebuilts = {new ExportedPrebuiltEntity("")}, + Regex = new ExportedEntityRegex + { + Expressions = {new ExportedEntityRegexExpression + { + RegexKey = "", + Language = "", + RegexPattern = "", + }}, + }, + RequiredComponents = {""}, + }}, + Utterances = {new ConversationExportedUtterance("", "") + { + Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); +Operation operation = client.Import(WaitUntil.Completed, "", body); +]]> +This sample shows how to call Import with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionSetting = CompositionSetting.ReturnLongestOverlap, + List = new ExportedEntityList + { + Sublists = {new ExportedEntitySublist + { + ListKey = "", + Synonyms = {new ExportedEntityListSynonym + { + Language = "", + Values = {""}, + }}, + }}, + }, + Prebuilts = {new ExportedPrebuiltEntity("")}, + Regex = new ExportedEntityRegex + { + Expressions = {new ExportedEntityRegexExpression + { + RegexKey = "", + Language = "", + RegexPattern = "", + }}, + }, + RequiredComponents = {""}, + }}, + Utterances = {new ConversationExportedUtterance("", "") + { + Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = client.Import(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call ImportAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { + new + { + category = "", + } + }, + entities = new object[] + { + new + { + category = "", + compositionSetting = "returnLongestOverlap", + list = new + { + sublists = new object[] + { + new + { + listKey = "", + synonyms = new object[] + { + new + { + language = "", + values = new object[] + { + "" + }, + } + }, + } + }, + }, + prebuilts = new object[] + { + new + { + category = "", + } + }, + regex = new + { + expressions = new object[] + { + new + { + regexKey = "", + language = "", + regexPattern = "", + } + }, + }, + requiredComponents = new object[] + { + "" + }, + } + }, + utterances = new object[] + { + new + { + entities = new object[] + { + new + { + category = "", + offset = 1234, + length = 1234, + } + }, + text = "", + language = "", + intent = "", + dataset = "", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content); +]]> +This sample shows how to call Import with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { + new + { + category = "", + } + }, + entities = new object[] + { + new + { + category = "", + compositionSetting = "returnLongestOverlap", + list = new + { + sublists = new object[] + { + new + { + listKey = "", + synonyms = new object[] + { + new + { + language = "", + values = new object[] + { + "" + }, + } + }, + } + }, + }, + prebuilts = new object[] + { + new + { + category = "", + } + }, + regex = new + { + expressions = new object[] + { + new + { + regexKey = "", + language = "", + regexPattern = "", + } + }, + }, + requiredComponents = new object[] + { + "" + }, + } + }, + utterances = new object[] + { + new + { + entities = new object[] + { + new + { + category = "", + offset = 1234, + length = 1234, + } + }, + text = "", + language = "", + intent = "", + dataset = "", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call TrainAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call Train with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call TrainAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingMode = "advanced", +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call TrainAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call Train and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingMode = "advanced", +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call Train with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeployments with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call EvaluateModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModelAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call EvaluateModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModel with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call LoadSnapshotAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call LoadSnapshot. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CancelTrainingJobAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJob. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJob with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJobAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call CancelTrainingJob and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJob with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingMode").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call DeleteExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Argument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..be9eb20389c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..ebd5ffcd7101 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..4eacbc67f6b6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5d5876cd582a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Optional.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..34b62b5f93f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..ff047ca8dbe7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..60bee30edf13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourcesMetadata"u8); + writer.WriteStartArray(); + foreach (var item in ResourcesMetadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static AssignDeploymentResourcesDetails DeserializeAssignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourcesMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourcesMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceMetadata.DeserializeResourceMetadata(item, options)); + } + resourcesMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesDetails(resourcesMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..afaf75245625 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// 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.Language.Conversations.Authoring.Models +{ + /// Represents the options for assigning Azure resources to a project. + public partial class AssignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// is null. + public AssignDeploymentResourcesDetails(IEnumerable resourcesMetadata) + { + Argument.AssertNotNull(resourcesMetadata, nameof(resourcesMetadata)); + + ResourcesMetadata = resourcesMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesDetails(IList resourcesMetadata, IDictionary serializedAdditionalRawData) + { + ResourcesMetadata = resourcesMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesDetails() + { + } + + /// Represents the metadata for the resources to be assigned. + public IList ResourcesMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9f5ca609d99b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedDeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedDeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + + internal static AssignedDeploymentResource DeserializeAssignedDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + AssignedDeploymentResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedDeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedDeploymentResource(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.cs new file mode 100644 index 000000000000..618f6d01d66e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedDeploymentResource.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the assigned deployment resource. + public partial class AssignedDeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource region. + /// is null. + internal AssignedDeploymentResource(string region) + { + Argument.AssertNotNull(region, nameof(region)); + + Region = region; + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedDeploymentResource(string azureResourceId, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedDeploymentResource() + { + } + + /// The resource ID. + public string AzureResourceId { get; } + /// The resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs new file mode 100644 index 000000000000..04c1e3d2fe12 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedProjectDeploymentMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedProjectDeploymentMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentMetadata DeserializeAssignedProjectDeploymentMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedProjectDeploymentMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs new file mode 100644 index 000000000000..fae2ecce4b15 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for an assigned deployment. + public partial class AssignedProjectDeploymentMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// is null. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate) + { + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentMetadata() + { + } + + /// Represents the deployment name. + public string DeploymentName { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..5b597fcb1be1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedProjectDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + writer.WritePropertyName("deploymentsMetadata"u8); + writer.WriteStartArray(); + foreach (var item in DeploymentsMetadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedProjectDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentsMetadata DeserializeAssignedProjectDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + IReadOnlyList deploymentsMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentsMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssignedProjectDeploymentMetadata.DeserializeAssignedProjectDeploymentMetadata(item, options)); + } + deploymentsMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentsMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedProjectDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs new file mode 100644 index 000000000000..9f66a10adc3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.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.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for assigned deployments for a project. + public partial class AssignedProjectDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// or is null. + internal AssignedProjectDeploymentsMetadata(string projectName, IEnumerable deploymentsMetadata) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(deploymentsMetadata, nameof(deploymentsMetadata)); + + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentsMetadata(string projectName, IReadOnlyList deploymentsMetadata, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentsMetadata() + { + } + + /// Represents the project name. + public string ProjectName { get; } + /// Represents the resource region. + public IReadOnlyList DeploymentsMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..abfd17b13326 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AssignedResourceDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedResourceDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedResourceDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedResourceDeploymentsMetadata DeserializeAssignedResourceDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedResourceDeploymentsMetadata(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedResourceDeploymentsMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedResourceDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedResourceDeploymentsMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedResourceDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedResourceDeploymentsMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.cs new file mode 100644 index 000000000000..30cb10584f98 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata for deployments assigned to a resource. + public partial class AssignedResourceDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// is null. + internal AssignedResourceDeploymentsMetadata(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of retrieved assigned project deployments. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal AssignedResourceDeploymentsMetadata(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedResourceDeploymentsMetadata() + { + } + + /// The list of retrieved assigned project deployments. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs new file mode 100644 index 000000000000..e10a01cd735b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AuthoringConversationsError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsError)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Innererror)) + { + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AuthoringConversationsError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthoringConversationsError(document.RootElement, options); + } + + internal static AuthoringConversationsError DeserializeAuthoringConversationsError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCode code = default; + string message = default; + string target = default; + IReadOnlyList details = default; + InnerErrorModel innererror = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new ErrorCode(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(DeserializeAuthoringConversationsError(item, options)); + } + details = array; + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = InnerErrorModel.DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthoringConversationsError( + code, + message, + target, + details ?? new ChangeTrackingList(), + innererror, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthoringConversationsError)} does not support writing '{options.Format}' format."); + } + } + + AuthoringConversationsError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthoringConversationsError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthoringConversationsError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AuthoringConversationsError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthoringConversationsError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs new file mode 100644 index 000000000000..ce1afc865676 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The error object. + public partial class AuthoringConversationsError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// is null. + internal AuthoringConversationsError(ErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 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. + /// + /// Keeps track of any properties unknown to the library. + internal AuthoringConversationsError(ErrorCode code, string message, string target, IReadOnlyList details, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Target = target; + Details = details; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AuthoringConversationsError() + { + } + + /// One of a server-defined set of error codes. + public ErrorCode Code { get; } + /// A human-readable representation of the error. + public string Message { get; } + /// The target of the error. + public string Target { get; } + /// An array of details about specific errors that led to this reported error. + public IReadOnlyList Details { get; } + /// + /// An object containing more specific information than the current object about + /// the error. + /// + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs new file mode 100644 index 000000000000..48ce205e2308 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class AuthoringConversationsWarning : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AuthoringConversationsWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthoringConversationsWarning(document.RootElement, options); + } + + internal static AuthoringConversationsWarning DeserializeAuthoringConversationsWarning(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthoringConversationsWarning(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support writing '{options.Format}' format."); + } + } + + AuthoringConversationsWarning IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthoringConversationsWarning(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthoringConversationsWarning)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AuthoringConversationsWarning FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthoringConversationsWarning(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs new file mode 100644 index 000000000000..d95d8f4f8f5c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a warning that was encountered while executing the request. + public partial class AuthoringConversationsWarning + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// or is null. + internal AuthoringConversationsWarning(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// Keeps track of any properties unknown to the library. + internal AuthoringConversationsWarning(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AuthoringConversationsWarning() + { + } + + /// The warning code. + public string Code { get; } + /// The warning message. + public string Message { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.cs new file mode 100644 index 000000000000..b4be981ec617 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.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.Language.Conversations.Authoring.Models +{ + /// The CompositionSetting. + public readonly partial struct CompositionSetting : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CompositionSetting(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReturnLongestOverlapValue = "returnLongestOverlap"; + private const string RequireExactOverlapValue = "requireExactOverlap"; + private const string SeparateComponentsValue = "separateComponents"; + private const string CombineComponentsValue = "combineComponents"; + + /// When two or more components are found in the text and overlap, the component with the longest set of characters is returned. + public static CompositionSetting ReturnLongestOverlap { get; } = new CompositionSetting(ReturnLongestOverlapValue); + /// All components must overlap at the exact same characters in the text for the entity to return. If one of the defined components is not matched or predicted, the entity will not return. + public static CompositionSetting RequireExactOverlap { get; } = new CompositionSetting(RequireExactOverlapValue); + /// Every component's match or prediction is returned as a separate instance of the entity. + public static CompositionSetting SeparateComponents { get; } = new CompositionSetting(SeparateComponentsValue); + /// When two or more components are found in the text and overlap, the components' spans are merged together into one span combining all of them. + public static CompositionSetting CombineComponents { get; } = new CompositionSetting(CombineComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(CompositionSetting left, CompositionSetting right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CompositionSetting left, CompositionSetting right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CompositionSetting(string value) => new CompositionSetting(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CompositionSetting other && Equals(other); + /// + public bool Equals(CompositionSetting other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs new file mode 100644 index 000000000000..289628a1b94e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConfusionMatrix : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + ConfusionMatrix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrix(document.RootElement, options); + } + + internal static ConfusionMatrix DeserializeConfusionMatrix(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrix(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrix IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrix(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrix FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrix(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.cs new file mode 100644 index 000000000000..0334a2da03b5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The ConfusionMatrix. + public partial class ConfusionMatrix + { + /// Initializes a new instance of . + internal ConfusionMatrix() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrix(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs new file mode 100644 index 000000000000..cc2df8970195 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("normalizedValue"u8); + writer.WriteNumberValue(NormalizedValue); + writer.WritePropertyName("rawValue"u8); + writer.WriteNumberValue(RawValue); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + + internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float normalizedValue = default; + float rawValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("normalizedValue"u8)) + { + normalizedValue = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("rawValue"u8)) + { + rawValue = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixCell IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrixCell FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixCell(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs new file mode 100644 index 000000000000..f1d43695af13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a cell in a confusion matrix. + public partial class ConfusionMatrixCell + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + internal ConfusionMatrixCell(float normalizedValue, float rawValue) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// Keeps track of any properties unknown to the library. + internal ConfusionMatrixCell(float normalizedValue, float rawValue, IDictionary serializedAdditionalRawData) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfusionMatrixCell() + { + } + + /// Represents normalized value in percentages. + public float NormalizedValue { get; } + /// Represents raw value. + public float RawValue { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs new file mode 100644 index 000000000000..05e9346b88b7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + ConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + + internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrixRow(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixRow IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrixRow FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixRow(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.cs new file mode 100644 index 000000000000..f83b84299f2e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The ConfusionMatrixRow. + public partial class ConfusionMatrixRow + { + /// Initializes a new instance of . + internal ConfusionMatrixRow() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrixRow(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs new file mode 100644 index 000000000000..ffc9ece17b27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (Optional.IsDefined(CompositionSetting)) + { + writer.WritePropertyName("compositionSetting"u8); + writer.WriteStringValue(CompositionSetting.Value.ToString()); + } + if (Optional.IsDefined(List)) + { + writer.WritePropertyName("list"u8); + writer.WriteObjectValue(List, options); + } + if (Optional.IsCollectionDefined(Prebuilts)) + { + writer.WritePropertyName("prebuilts"u8); + writer.WriteStartArray(); + foreach (var item in Prebuilts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Regex)) + { + writer.WritePropertyName("regex"u8); + writer.WriteObjectValue(Regex, options); + } + if (Optional.IsCollectionDefined(RequiredComponents)) + { + writer.WritePropertyName("requiredComponents"u8); + writer.WriteStartArray(); + foreach (var item in RequiredComponents) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationExportedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedEntity(document.RootElement, options); + } + + internal static ConversationExportedEntity DeserializeConversationExportedEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + CompositionSetting? compositionSetting = default; + ExportedEntityList list = default; + IList prebuilts = default; + ExportedEntityRegex regex = default; + IList requiredComponents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("compositionSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compositionSetting = new CompositionSetting(property.Value.GetString()); + continue; + } + if (property.NameEquals("list"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + list = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); + continue; + } + if (property.NameEquals("prebuilts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedPrebuiltEntity.DeserializeExportedPrebuiltEntity(item, options)); + } + prebuilts = array; + continue; + } + if (property.NameEquals("regex"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regex = ExportedEntityRegex.DeserializeExportedEntityRegex(property.Value, options); + continue; + } + if (property.NameEquals("requiredComponents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredComponents = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedEntity( + category, + compositionSetting, + list, + prebuilts ?? new ChangeTrackingList(), + regex, + requiredComponents ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConversationExportedEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConversationExportedEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.cs new file mode 100644 index 000000000000..1c617fcdfbb1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an entity with its components. + public partial class ConversationExportedEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The category of the entity. + /// is null. + public ConversationExportedEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Prebuilts = new ChangeTrackingList(); + RequiredComponents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The category of the entity. + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The regex component of the entity. + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedEntity(string category, CompositionSetting? compositionSetting, ExportedEntityList list, IList prebuilts, ExportedEntityRegex regex, IList requiredComponents, IDictionary serializedAdditionalRawData) + { + Category = category; + CompositionSetting = compositionSetting; + List = list; + Prebuilts = prebuilts; + Regex = regex; + RequiredComponents = requiredComponents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedEntity() + { + } + + /// The category of the entity. + public string Category { get; } + /// The behavior to follow when the entity's components overlap with each other. + public CompositionSetting? CompositionSetting { get; set; } + /// The list component of the entity. + public ExportedEntityList List { get; set; } + /// The prebuilt entities components. + public IList Prebuilts { get; } + /// The regex component of the entity. + public ExportedEntityRegex Regex { get; set; } + /// The required components. Allowed values are 'learned', 'list', 'prebuilts' and 'regex'. + public IList RequiredComponents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.Serialization.cs new file mode 100644 index 000000000000..2a9de3a64a43 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedIntent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedIntent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationExportedIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedIntent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedIntent(document.RootElement, options); + } + + internal static ConversationExportedIntent DeserializeConversationExportedIntent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedIntent(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedIntent)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedIntent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConversationExportedIntent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedIntent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConversationExportedIntent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedIntent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs new file mode 100644 index 000000000000..4409a0b0c7ec --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedIntent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported intent of a conversational project. + public partial class ConversationExportedIntent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The intent category. + /// is null. + public ConversationExportedIntent(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The intent category. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedIntent(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedIntent() + { + } + + /// The intent category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..ac8e5daf98a1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Intents)) + { + writer.WritePropertyName("intents"u8); + writer.WriteStartArray(); + foreach (var item in Intents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Utterances)) + { + writer.WritePropertyName("utterances"u8); + writer.WriteStartArray(); + foreach (var item in Utterances) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ConversationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedProjectAssets(document.RootElement, options); + } + + internal static ConversationExportedProjectAssets DeserializeConversationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList intents = default; + IList entities = default; + IList utterances = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("intents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedIntent.DeserializeConversationExportedIntent(item, options)); + } + intents = array; + continue; + } + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedEntity.DeserializeConversationExportedEntity(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("utterances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConversationExportedUtterance.DeserializeConversationExportedUtterance(item, options)); + } + utterances = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), entities ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConversationExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ConversationExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs new file mode 100644 index 000000000000..2691cb10e99d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the exported assets of a conversational project. + public partial class ConversationExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ConversationExportedProjectAssets() + { + ProjectKind = ProjectKind.Conversation; + Intents = new ChangeTrackingList(); + Entities = new ChangeTrackingList(); + Utterances = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + /// The intents defined in the project. + /// The entities defined in the project. + /// The utterances defined in the project. + internal ConversationExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList entities, IList utterances) : base(projectKind, serializedAdditionalRawData) + { + Intents = intents; + Entities = entities; + Utterances = utterances; + } + + /// The intents defined in the project. + public IList Intents { get; } + /// The entities defined in the project. + public IList Entities { get; } + /// The utterances defined in the project. + public IList Utterances { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs new file mode 100644 index 000000000000..68b49a371f93 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.Serialization.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ConversationExportedUtterance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent); + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConversationExportedUtterance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConversationExportedUtterance(document.RootElement, options); + } + + internal static ConversationExportedUtterance DeserializeConversationExportedUtterance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string text = default; + string language = default; + string intent = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedUtteranceEntityLabel.DeserializeExportedUtteranceEntityLabel(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + intent = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConversationExportedUtterance( + entities ?? new ChangeTrackingList(), + text, + language, + intent, + dataset, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support writing '{options.Format}' format."); + } + } + + ConversationExportedUtterance IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConversationExportedUtterance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConversationExportedUtterance)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConversationExportedUtterance FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConversationExportedUtterance(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.cs new file mode 100644 index 000000000000..7816b840ba05 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedUtterance.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported utterance for a conversational project. + public partial class ConversationExportedUtterance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The utterance text. + /// The intent of the utterance. + /// or is null. + public ConversationExportedUtterance(string text, string intent) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(intent, nameof(intent)); + + Entities = new ChangeTrackingList(); + Text = text; + Intent = intent; + } + + /// Initializes a new instance of . + /// Represents the entity labels of the utterance. + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ConversationExportedUtterance(IList entities, string text, string language, string intent, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Text = text; + Language = language; + Intent = intent; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConversationExportedUtterance() + { + } + + /// Represents the entity labels of the utterance. + public IList Entities { get; } + /// The utterance text. + public string Text { get; } + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The intent of the utterance. + public string Intent { get; } + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs new file mode 100644 index 000000000000..3267d337db0d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + internal partial class CopyProjectAuthorizationRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + if (Optional.IsDefined(AllowOverwrite)) + { + writer.WritePropertyName("allowOverwrite"u8); + writer.WriteBooleanValue(AllowOverwrite.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectAuthorizationRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + + internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizationRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + bool? allowOverwrite = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowOverwrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowOverwrite = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectAuthorizationRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectAuthorizationRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs new file mode 100644 index 000000000000..e09ac95e521e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The CopyProjectAuthorizationRequest. + internal partial class CopyProjectAuthorizationRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind) + { + ProjectKind = projectKind; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// Keeps track of any properties unknown to the library. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind, string storageInputContainerName, bool? allowOverwrite, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + AllowOverwrite = allowOverwrite; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectAuthorizationRequest() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The name of the storage container. + public string StorageInputContainerName { get; } + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + public bool? AllowOverwrite { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs new file mode 100644 index 000000000000..079609f4bae5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class CopyProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("targetProjectName"u8); + writer.WriteStringValue(TargetProjectName); + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + writer.WritePropertyName("expiresAt"u8); + writer.WriteStringValue(ExpiresAt, "O"); + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + writer.WritePropertyName("targetResourceRegion"u8); + writer.WriteStringValue(TargetResourceRegion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + + internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string targetProjectName = default; + string accessToken = default; + DateTimeOffset expiresAt = default; + string targetResourceId = default; + string targetResourceRegion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetProjectName"u8)) + { + targetProjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken"u8)) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresAt"u8)) + { + expiresAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("targetResourceId"u8)) + { + targetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceRegion"u8)) + { + targetResourceRegion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectDetails( + projectKind, + targetProjectName, + accessToken, + expiresAt, + targetResourceId, + targetResourceRegion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.cs new file mode 100644 index 000000000000..8d0bc4bd02b4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectDetails.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for copying an existing project to another Azure resource. + public partial class CopyProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// , , or is null. + public CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) + { + Argument.AssertNotNull(targetProjectName, nameof(targetProjectName)); + Argument.AssertNotNull(accessToken, nameof(accessToken)); + Argument.AssertNotNull(targetResourceId, nameof(targetResourceId)); + Argument.AssertNotNull(targetResourceRegion, nameof(targetResourceRegion)); + + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// Keeps track of any properties unknown to the library. + internal CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; set; } + /// The project name to be copied-into. + public string TargetProjectName { get; set; } + /// The access token. + public string AccessToken { get; set; } + /// The expiration of the access token. + public DateTimeOffset ExpiresAt { get; set; } + /// Represents the target Azure resource ID. + public string TargetResourceId { get; set; } + /// Represents the target Azure resource region. + public string TargetResourceRegion { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs new file mode 100644 index 000000000000..351975e9b155 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class CopyProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + + internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs new file mode 100644 index 000000000000..affeb356c89a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a copy job. + public partial class CopyProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal CopyProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal CopyProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..a3ff347a4c4e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class CreateDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CreateDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + + internal static CreateDeploymentDetails DeserializeCreateDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateDeploymentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateDeploymentDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.cs new file mode 100644 index 000000000000..d2968ccadf5a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateDeploymentDetails.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for creating or updating a project deployment. + public partial class CreateDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the trained model label. + /// is null. + public CreateDeploymentDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// Keeps track of any properties unknown to the library. + internal CreateDeploymentDetails(string trainedModelLabel, IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateDeploymentDetails() + { + } + + /// Represents the trained model label. + public string TrainedModelLabel { get; } + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs new file mode 100644 index 000000000000..5d8062fd3505 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class CreateProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CreateProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + + internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + ProjectSettings settings = default; + string storageInputContainerName = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateProjectDetails( + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateProjectDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateProjectDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.cs new file mode 100644 index 000000000000..3d21a556966e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CreateProjectDetails.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options used to create or update a project. + public partial class CreateProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + public CreateProjectDetails(ProjectKind projectKind, string projectName, string language) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + ProjectKind = projectKind; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal CreateProjectDetails(ProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + Settings = settings; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The project settings. + public ProjectSettings Settings { get; set; } + /// The storage container name in case of conversation summarization. + public string StorageInputContainerName { get; set; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; set; } + /// The project description. + public string Description { get; set; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..33d8c05f5bcc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class DeleteDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeleteDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + + internal static DeleteDeploymentDetails DeserializeDeleteDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteDeploymentDetails(assignedResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + DeleteDeploymentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeleteDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeleteDeploymentDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs new file mode 100644 index 000000000000..316e05a21637 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for deleting a project deployment. + public partial class DeleteDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeleteDeploymentDetails() + { + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + /// Keeps track of any properties unknown to the library. + internal DeleteDeploymentDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..f2db094604c4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class DeploymentDeleteFromResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentDeleteFromResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + + internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDeleteFromResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentDeleteFromResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentDeleteFromResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs new file mode 100644 index 000000000000..4e1ee9ed2c1c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an existing delete deployment from specific resources job. + public partial class DeploymentDeleteFromResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentDeleteFromResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentDeleteFromResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentDeleteFromResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs new file mode 100644 index 000000000000..bc975cd541a8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class DeploymentJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentJobState(document.RootElement, options); + } + + internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs new file mode 100644 index 000000000000..3b027b6d8460 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class DeploymentJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9b3584664355 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class DeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResource(document.RootElement, options); + } + + internal static DeploymentResource DeserializeDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResource(resourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResource(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.cs new file mode 100644 index 000000000000..3f4266909d51 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResource.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an Azure resource assigned to a deployment. + public partial class DeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// or is null. + internal DeploymentResource(string resourceId, string region) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(region, nameof(region)); + + ResourceId = resourceId; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal DeploymentResource(string resourceId, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResource() + { + } + + /// Represents the Azure resource Id. + public string ResourceId { get; } + /// Represents the resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..c868942c403f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class DeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResourcesJobState(document.RootElement, options); + } + + internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResourcesJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs new file mode 100644 index 000000000000..1448217b4dbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment resources job. + public partial class DeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..c47755962689 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EntitiesEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("entities"u8); + writer.WriteStartObject(); + foreach (var item in Entities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EntitiesEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntitiesEvaluationSummary(document.RootElement, options); + } + + internal static EntitiesEvaluationSummary DeserializeEntitiesEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary entities = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("entities"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EntityEvaluationSummary.DeserializeEntityEvaluationSummary(property0.Value, options)); + } + entities = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntitiesEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntitiesEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntitiesEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntitiesEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EntitiesEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntitiesEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.cs new file mode 100644 index 000000000000..1ba5c2a42ed7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntitiesEvaluationSummary.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result summary for the project's entities. + public partial class EntitiesEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(entities, nameof(entities)); + + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntitiesEvaluationSummary() + { + } + + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the entities evaluation summary. + public IReadOnlyDictionary Entities { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..878ad1dcd845 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EntityEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EntityEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + + internal static EntityEvaluationSummary DeserializeEntityEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EntityEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.cs new file mode 100644 index 000000000000..131743f41f7b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EntityEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result for an entity. + public partial class EntityEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs new file mode 100644 index 000000000000..977595b99c5f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct ErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidArgumentValue = "InvalidArgument"; + private const string UnauthorizedValue = "Unauthorized"; + private const string ForbiddenValue = "Forbidden"; + private const string NotFoundValue = "NotFound"; + private const string ProjectNotFoundValue = "ProjectNotFound"; + private const string OperationNotFoundValue = "OperationNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchIndexNotFoundValue = "AzureCognitiveSearchIndexNotFound"; + private const string TooManyRequestsValue = "TooManyRequests"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string AzureCognitiveSearchIndexLimitReachedValue = "AzureCognitiveSearchIndexLimitReached"; + private const string InternalServerErrorValue = "InternalServerError"; + private const string ServiceUnavailableValue = "ServiceUnavailable"; + private const string TimeoutValue = "Timeout"; + private const string QuotaExceededValue = "QuotaExceeded"; + private const string ConflictValue = "Conflict"; + private const string WarningValue = "Warning"; + + /// InvalidRequest. + public static ErrorCode InvalidRequest { get; } = new ErrorCode(InvalidRequestValue); + /// InvalidArgument. + public static ErrorCode InvalidArgument { get; } = new ErrorCode(InvalidArgumentValue); + /// Unauthorized. + public static ErrorCode Unauthorized { get; } = new ErrorCode(UnauthorizedValue); + /// Forbidden. + public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); + /// NotFound. + public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); + /// ProjectNotFound. + public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); + /// OperationNotFound. + public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchIndexNotFound. + public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); + /// TooManyRequests. + public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); + /// AzureCognitiveSearchThrottling. + public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); + /// AzureCognitiveSearchIndexLimitReached. + public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); + /// InternalServerError. + public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); + /// ServiceUnavailable. + public static ErrorCode ServiceUnavailable { get; } = new ErrorCode(ServiceUnavailableValue); + /// Timeout. + public static ErrorCode Timeout { get; } = new ErrorCode(TimeoutValue); + /// QuotaExceeded. + public static ErrorCode QuotaExceeded { get; } = new ErrorCode(QuotaExceededValue); + /// Conflict. + public static ErrorCode Conflict { get; } = new ErrorCode(ConflictValue); + /// Warning. + public static ErrorCode Warning { get; } = new ErrorCode(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(ErrorCode left, ErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ErrorCode left, ErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ErrorCode(string value) => new ErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ErrorCode other && Equals(other); + /// + public bool Equals(ErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs new file mode 100644 index 000000000000..2a72e648962b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + if (Optional.IsDefined(TrainingSplitPercentage)) + { + writer.WritePropertyName("trainingSplitPercentage"u8); + writer.WriteNumberValue(TrainingSplitPercentage.Value); + } + if (Optional.IsDefined(TestingSplitPercentage)) + { + writer.WritePropertyName("testingSplitPercentage"u8); + writer.WriteNumberValue(TestingSplitPercentage.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationDetails(document.RootElement, options); + } + + internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationKind? kind = default; + int? trainingSplitPercentage = default; + int? testingSplitPercentage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new EvaluationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("testingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationDetails(kind, trainingSplitPercentage, testingSplitPercentage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{options.Format}' format."); + } + } + + EvaluationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.cs new file mode 100644 index 000000000000..c843e5d23f9b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationDetails.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options used running the evaluation. + public partial class EvaluationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EvaluationDetails() + { + } + + /// Initializes a new instance of . + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationDetails(EvaluationKind? kind, int? trainingSplitPercentage, int? testingSplitPercentage, IDictionary serializedAdditionalRawData) + { + Kind = kind; + TrainingSplitPercentage = trainingSplitPercentage; + TestingSplitPercentage = testingSplitPercentage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + public EvaluationKind? Kind { get; set; } + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TrainingSplitPercentage { get; set; } + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TestingSplitPercentage { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs new file mode 100644 index 000000000000..a42d020c0f60 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + + internal static EvaluationJobResult DeserializeEvaluationJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationDetails evaluationOptions = default; + string modelLabel = default; + string trainingConfigVersion = default; + int percentComplete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.cs new file mode 100644 index 000000000000..66c98233abbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobResult.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The EvaluationJobResult. + public partial class EvaluationJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// , or is null. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete, IDictionary serializedAdditionalRawData) + { + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobResult() + { + } + + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents progress percentage. + public int PercentComplete { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs new file mode 100644 index 000000000000..724796e50c91 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobState(document.RootElement, options); + } + + internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + EvaluationJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = EvaluationJobResult.DeserializeEvaluationJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs new file mode 100644 index 000000000000..fba4e55b822e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a evaluation job. + public partial class EvaluationJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents evaluation task detailed result. + /// is null. + internal EvaluationJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, EvaluationJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, EvaluationJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents evaluation task detailed result. + public EvaluationJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.cs new file mode 100644 index 000000000000..9b1349bc8470 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.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.Language.Conversations.Authoring.Models +{ + /// The EvaluationKind. + public readonly partial struct EvaluationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PercentageValue = "percentage"; + private const string ManualValue = "manual"; + + /// Split the data into training and test sets according to user-defined percentages. + public static EvaluationKind Percentage { get; } = new EvaluationKind(PercentageValue); + /// Split the data according to the chosen dataset for every example in the data. + public static EvaluationKind Manual { get; } = new EvaluationKind(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationKind left, EvaluationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationKind left, EvaluationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EvaluationKind(string value) => new EvaluationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationKind other && Equals(other); + /// + public bool Equals(EvaluationKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..a0f36f651de7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class EvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entitiesEvaluation"u8); + writer.WriteObjectValue(EntitiesEvaluation, options); + writer.WritePropertyName("intentsEvaluation"u8); + writer.WriteObjectValue(IntentsEvaluation, options); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationSummary(document.RootElement, options); + } + + internal static EvaluationSummary DeserializeEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntitiesEvaluationSummary entitiesEvaluation = default; + IntentsEvaluationSummary intentsEvaluation = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entitiesEvaluation"u8)) + { + entitiesEvaluation = EntitiesEvaluationSummary.DeserializeEntitiesEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("intentsEvaluation"u8)) + { + intentsEvaluation = IntentsEvaluationSummary.DeserializeIntentsEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationSummary(entitiesEvaluation, intentsEvaluation, evaluationOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.cs new file mode 100644 index 000000000000..94a75419a4d3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationSummary.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result summary. + public partial class EvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Contains the data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// or is null. + internal EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation, IntentsEvaluationSummary intentsEvaluation) + { + Argument.AssertNotNull(entitiesEvaluation, nameof(entitiesEvaluation)); + Argument.AssertNotNull(intentsEvaluation, nameof(intentsEvaluation)); + + EntitiesEvaluation = entitiesEvaluation; + IntentsEvaluation = intentsEvaluation; + } + + /// Initializes a new instance of . + /// Contains the data related to entities evaluation. + /// Contains the data related to intents evaluation. + /// The options that were used while running the evaluation. + /// Keeps track of any properties unknown to the library. + internal EvaluationSummary(EntitiesEvaluationSummary entitiesEvaluation, IntentsEvaluationSummary intentsEvaluation, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + EntitiesEvaluation = entitiesEvaluation; + IntentsEvaluation = intentsEvaluation; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationSummary() + { + } + + /// Contains the data related to entities evaluation. + public EntitiesEvaluationSummary EntitiesEvaluation { get; } + /// Contains the data related to intents evaluation. + public IntentsEvaluationSummary IntentsEvaluation { get; } + /// The options that were used while running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..954191e78e64 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResultUrl)) + { + writer.WritePropertyName("resultUrl"u8); + writer.WriteStringValue(ResultUrl); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportProjectJobState(document.RootElement, options); + } + + internal static ExportProjectJobState DeserializeExportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + string resultUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("resultUrl"u8)) + { + resultUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + resultUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs new file mode 100644 index 000000000000..3ba56b46d8d9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an export job. + public partial class ExportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// Keeps track of any properties unknown to the library. + internal ExportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, string resultUrl, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + ResultUrl = resultUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// The URL to use in order to download the exported project. + public string ResultUrl { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.Serialization.cs new file mode 100644 index 000000000000..41c601cc632d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedConversationOrchestration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedConversationOrchestration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedConversationOrchestration(document.RootElement, options); + } + + internal static ExportedConversationOrchestration DeserializeExportedConversationOrchestration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + string deploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedConversationOrchestration(projectName, deploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support writing '{options.Format}' format."); + } + } + + ExportedConversationOrchestration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedConversationOrchestration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedConversationOrchestration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedConversationOrchestration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs new file mode 100644 index 000000000000..f57a2d7bf8e4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Defines the orchestration details for a Conversational project target. + public partial class ExportedConversationOrchestration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the targeted project. + /// The name of the targeted deployment. + /// or is null. + public ExportedConversationOrchestration(string projectName, string deploymentName) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ProjectName = projectName; + DeploymentName = deploymentName; + } + + /// Initializes a new instance of . + /// The name of the targeted project. + /// The name of the targeted deployment. + /// Keeps track of any properties unknown to the library. + internal ExportedConversationOrchestration(string projectName, string deploymentName, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + DeploymentName = deploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedConversationOrchestration() + { + } + + /// The name of the targeted project. + public string ProjectName { get; } + /// The name of the targeted deployment. + public string DeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..a9ce67575e81 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedConversationOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("conversationOrchestration"u8); + writer.WriteObjectValue(ConversationOrchestration, options); + } + + ExportedConversationOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedConversationOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedConversationOrchestrationDetails DeserializeExportedConversationOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedConversationOrchestration conversationOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("conversationOrchestration"u8)) + { + conversationOrchestration = ExportedConversationOrchestration.DeserializeExportedConversationOrchestration(property.Value, options); + continue; + } + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedConversationOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, conversationOrchestration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedConversationOrchestrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedConversationOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedConversationOrchestrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedConversationOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedConversationOrchestrationDetails(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs new file mode 100644 index 000000000000..5608bc103013 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedConversationOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the orchestration options for a Conversational project target. + public partial class ExportedConversationOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The Conversational project target details. + /// is null. + public ExportedConversationOrchestrationDetails(ExportedConversationOrchestration conversationOrchestration) + { + Argument.AssertNotNull(conversationOrchestration, nameof(conversationOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.Conversation; + ConversationOrchestration = conversationOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The Conversational project target details. + internal ExportedConversationOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedConversationOrchestration conversationOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + ConversationOrchestration = conversationOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedConversationOrchestrationDetails() + { + } + + /// The Conversational project target details. + public ExportedConversationOrchestration ConversationOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs new file mode 100644 index 000000000000..31982aed6e1b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntityList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Sublists)) + { + writer.WritePropertyName("sublists"u8); + writer.WriteStartArray(); + foreach (var item in Sublists) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityList(document.RootElement, options); + } + + internal static ExportedEntityList DeserializeExportedEntityList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sublists = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sublists"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntitySublist.DeserializeExportedEntitySublist(item, options)); + } + sublists = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityList(sublists ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityList(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.cs new file mode 100644 index 000000000000..cfe3c92bcbc9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityList.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list component of an entity. + public partial class ExportedEntityList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityList() + { + Sublists = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The sub-lists of the list component. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityList(IList sublists, IDictionary serializedAdditionalRawData) + { + Sublists = sublists; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sub-lists of the list component. + public IList Sublists { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs new file mode 100644 index 000000000000..d004442e624e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntityListSynonym : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityListSynonym IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + + internal static ExportedEntityListSynonym DeserializeExportedEntityListSynonym(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string language = default; + IList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityListSynonym(language, values ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityListSynonym IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityListSynonym FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityListSynonym(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs new file mode 100644 index 000000000000..2ba86e1499c0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of synonyms inside a list component. + public partial class ExportedEntityListSynonym + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityListSynonym() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The list of synonyms. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityListSynonym(string language, IList values, IDictionary serializedAdditionalRawData) + { + Language = language; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The list of synonyms. + public IList Values { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.Serialization.cs new file mode 100644 index 000000000000..fa55b4f257a9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntityRegex : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Expressions)) + { + writer.WritePropertyName("expressions"u8); + writer.WriteStartArray(); + foreach (var item in Expressions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityRegex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityRegex(document.RootElement, options); + } + + internal static ExportedEntityRegex DeserializeExportedEntityRegex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList expressions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityRegexExpression.DeserializeExportedEntityRegexExpression(item, options)); + } + expressions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityRegex(expressions ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityRegex IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityRegex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityRegex)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityRegex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityRegex(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.cs new file mode 100644 index 000000000000..078e0e0daf90 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegex.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a regex component of an entity. + public partial class ExportedEntityRegex + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityRegex() + { + Expressions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The regex expressions of the regex component. These expressions follow the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityRegex(IList expressions, IDictionary serializedAdditionalRawData) + { + Expressions = expressions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The regex expressions of the regex component. These expressions follow the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + public IList Expressions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs new file mode 100644 index 000000000000..2d8b82b34d22 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntityRegexExpression : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegexExpression)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegexKey)) + { + writer.WritePropertyName("regexKey"u8); + writer.WriteStringValue(RegexKey); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(RegexPattern)) + { + writer.WritePropertyName("regexPattern"u8); + writer.WriteStringValue(RegexPattern); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityRegexExpression IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityRegexExpression)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityRegexExpression(document.RootElement, options); + } + + internal static ExportedEntityRegexExpression DeserializeExportedEntityRegexExpression(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string regexKey = default; + string language = default; + string regexPattern = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("regexKey"u8)) + { + regexKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("regexPattern"u8)) + { + regexPattern = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityRegexExpression(regexKey, language, regexPattern, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityRegexExpression)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityRegexExpression IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityRegexExpression(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityRegexExpression)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityRegexExpression FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityRegexExpression(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.cs new file mode 100644 index 000000000000..7237a35366ba --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntityRegexExpression.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a regex expression inside a regex component. This expression follows the .NET regex syntax. For reference, check here: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions. + public partial class ExportedEntityRegexExpression + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityRegexExpression() + { + } + + /// Initializes a new instance of . + /// The key of the regex expression. + /// Represents the language of the regex expression. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The regex pattern. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityRegexExpression(string regexKey, string language, string regexPattern, IDictionary serializedAdditionalRawData) + { + RegexKey = regexKey; + Language = language; + RegexPattern = regexPattern; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the regex expression. + public string RegexKey { get; set; } + /// Represents the language of the regex expression. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The regex pattern. + public string RegexPattern { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs new file mode 100644 index 000000000000..f92a3ac58325 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedEntitySublist : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ListKey)) + { + writer.WritePropertyName("listKey"u8); + writer.WriteStringValue(ListKey); + } + if (Optional.IsCollectionDefined(Synonyms)) + { + writer.WritePropertyName("synonyms"u8); + writer.WriteStartArray(); + foreach (var item in Synonyms) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntitySublist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + + internal static ExportedEntitySublist DeserializeExportedEntitySublist(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string listKey = default; + IList synonyms = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("listKey"u8)) + { + listKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("synonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityListSynonym.DeserializeExportedEntityListSynonym(item, options)); + } + synonyms = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntitySublist(listKey, synonyms ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntitySublist IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntitySublist FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntitySublist(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.cs new file mode 100644 index 000000000000..1b8e6399c72f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedEntitySublist.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a sub-list inside a list component. + public partial class ExportedEntitySublist + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntitySublist() + { + Synonyms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The key of the sub-list. + /// The phrases of that correspond to the sub-list. + /// Keeps track of any properties unknown to the library. + internal ExportedEntitySublist(string listKey, IList synonyms, IDictionary serializedAdditionalRawData) + { + ListKey = listKey; + Synonyms = synonyms; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the sub-list. + public string ListKey { get; set; } + /// The phrases of that correspond to the sub-list. + public IList Synonyms { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.Serialization.cs new file mode 100644 index 000000000000..423733bd7bc6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedLuisOrchestration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appId"u8); + writer.WriteStringValue(AppId); + if (Optional.IsDefined(AppVersion)) + { + writer.WritePropertyName("appVersion"u8); + writer.WriteStringValue(AppVersion); + } + if (Optional.IsDefined(SlotName)) + { + writer.WritePropertyName("slotName"u8); + writer.WriteStringValue(SlotName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedLuisOrchestration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedLuisOrchestration(document.RootElement, options); + } + + internal static ExportedLuisOrchestration DeserializeExportedLuisOrchestration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid appId = default; + string appVersion = default; + string slotName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appId"u8)) + { + appId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("appVersion"u8)) + { + appVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("slotName"u8)) + { + slotName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support writing '{options.Format}' format."); + } + } + + ExportedLuisOrchestration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedLuisOrchestration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedLuisOrchestration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedLuisOrchestration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.cs new file mode 100644 index 000000000000..54f3c5b3567d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestration.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Defines the orchestration details for a LUIS application target. + public partial class ExportedLuisOrchestration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The LUIS application ID. + public ExportedLuisOrchestration(Guid appId) + { + AppId = appId; + } + + /// Initializes a new instance of . + /// The LUIS application ID. + /// The targeted version Id. + /// The targeted slot name. + /// Keeps track of any properties unknown to the library. + internal ExportedLuisOrchestration(Guid appId, string appVersion, string slotName, IDictionary serializedAdditionalRawData) + { + AppId = appId; + AppVersion = appVersion; + SlotName = slotName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedLuisOrchestration() + { + } + + /// The LUIS application ID. + public Guid AppId { get; } + /// The targeted version Id. + public string AppVersion { get; set; } + /// The targeted slot name. + public string SlotName { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..7b9f2c6942fc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedLuisOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("luisOrchestration"u8); + writer.WriteObjectValue(LuisOrchestration, options); + } + + ExportedLuisOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedLuisOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedLuisOrchestrationDetails DeserializeExportedLuisOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedLuisOrchestration luisOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("luisOrchestration"u8)) + { + luisOrchestration = ExportedLuisOrchestration.DeserializeExportedLuisOrchestration(property.Value, options); + continue; + } + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedLuisOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, luisOrchestration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedLuisOrchestrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedLuisOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedLuisOrchestrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedLuisOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedLuisOrchestrationDetails(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs new file mode 100644 index 000000000000..a8f05290d6be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedLuisOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the orchestration options for a LUIS application target. + public partial class ExportedLuisOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The LUIS application target details. + /// is null. + public ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration) + { + Argument.AssertNotNull(luisOrchestration, nameof(luisOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.Luis; + LuisOrchestration = luisOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The LUIS application target details. + internal ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedLuisOrchestration luisOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + LuisOrchestration = luisOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedLuisOrchestrationDetails() + { + } + + /// The LUIS application target details. + public ExportedLuisOrchestration LuisOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs new file mode 100644 index 000000000000..d013d638887f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedModelDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedModelDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelDetails(document.RootElement, options); + } + + internal static ExportedModelDetails DeserializeExportedModelDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelDetails(trainedModelLabel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedModelDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedModelDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.cs new file mode 100644 index 000000000000..8a3b7c00553f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for creating or replacing an exported model. + public partial class ExportedModelDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The trained model label. + /// is null. + public ExportedModelDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + } + + /// Initializes a new instance of . + /// The trained model label. + /// Keeps track of any properties unknown to the library. + internal ExportedModelDetails(string trainedModelLabel, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelDetails() + { + } + + /// The trained model label. + public string TrainedModelLabel { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs new file mode 100644 index 000000000000..2d5ee327c04c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedModelJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedModelJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelJobState(document.RootElement, options); + } + + internal static ExportedModelJobState DeserializeExportedModelJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedModelJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedModelJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs new file mode 100644 index 000000000000..639c21edbf42 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a job to create or updated an exported model. + public partial class ExportedModelJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportedModelJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ExportedModelJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..e02847527d4a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedOrchestrationDetails))] + public partial class ExportedOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedOrchestrationDetails DeserializeExportedOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("targetProjectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Conversation": return ExportedConversationOrchestrationDetails.DeserializeExportedConversationOrchestrationDetails(element, options); + case "Luis": return ExportedLuisOrchestrationDetails.DeserializeExportedLuisOrchestrationDetails(element, options); + case "QuestionAnswering": return ExportedQuestionAnsweringOrchestrationDetails.DeserializeExportedQuestionAnsweringOrchestrationDetails(element, options); + } + } + return UnknownExportedOrchestrationDetails.DeserializeUnknownExportedOrchestrationDetails(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedOrchestrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedOrchestrationDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.cs new file mode 100644 index 000000000000..3316c6506c99 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedOrchestrationDetails.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// + /// Represents the options used to define the orchestration behavior of an intent. + /// 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 ExportedOrchestrationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ExportedOrchestrationDetails() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData) + { + TargetProjectKind = targetProjectKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the target project kind. + internal OrchestrationTargetProjectKind TargetProjectKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..a217e3a5eaf3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedPrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedPrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + + internal static ExportedPrebuiltEntity DeserializeExportedPrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedPrebuiltEntity(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedPrebuiltEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedPrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedPrebuiltEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs new file mode 100644 index 000000000000..a5055390057e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported prebuilt entity component. + public partial class ExportedPrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// is null. + public ExportedPrebuiltEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedPrebuiltEntity(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedPrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.Serialization.cs new file mode 100644 index 000000000000..c27bdef7d60f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedProject : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectFileVersion"u8); + writer.WriteStringValue(ProjectFileVersion); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.ToString()); + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + if (Optional.IsDefined(Assets)) + { + writer.WritePropertyName("assets"u8); + writer.WriteObjectValue(Assets, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProject(document.RootElement, options); + } + + internal static ExportedProject DeserializeExportedProject(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectFileVersion = default; + StringIndexType stringIndexType = default; + CreateProjectDetails metadata = default; + ExportedProjectAssets assets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectFileVersion"u8)) + { + projectFileVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + metadata = CreateProjectDetails.DeserializeCreateProjectDetails(property.Value, options); + continue; + } + if (property.NameEquals("assets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assets = ExportedProjectAssets.DeserializeExportedProjectAssets(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{options.Format}' format."); + } + } + + ExportedProject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedProject FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProject(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.cs new file mode 100644 index 000000000000..75bdf301aa5e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProject.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported project. + public partial class ExportedProject + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// or is null. + public ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata) + { + Argument.AssertNotNull(projectFileVersion, nameof(projectFileVersion)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata, ExportedProjectAssets assets, IDictionary serializedAdditionalRawData) + { + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + Assets = assets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedProject() + { + } + + /// The version of the exported file. + public string ProjectFileVersion { get; } + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + public StringIndexType StringIndexType { get; } + /// Represents the project metadata. + public CreateProjectDetails Metadata { get; } + /// + /// Represents the project assets. + /// 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 ExportedProjectAssets Assets { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..6fe2e7b2ffc0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedProjectAssets))] + public partial class ExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Conversation": return ConversationExportedProjectAssets.DeserializeConversationExportedProjectAssets(element, options); + case "Orchestration": return OrchestrationExportedProjectAssets.DeserializeOrchestrationExportedProjectAssets(element, options); + } + } + return UnknownExportedProjectAssets.DeserializeUnknownExportedProjectAssets(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs new file mode 100644 index 000000000000..c039092126af --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// + /// Represents the assets of an exported project. + /// 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 ExportedProjectAssets + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ExportedProjectAssets() + { + } + + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + internal ExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of project containing the assets. + internal ProjectKind ProjectKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.cs new file mode 100644 index 000000000000..2792adaccde8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.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.Language.Conversations.Authoring.Models +{ + /// The ExportedProjectFormat. + public readonly partial struct ExportedProjectFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExportedProjectFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConversationValue = "Conversation"; + private const string LuisValue = "Luis"; + + /// Specifies the format for a conversational project. + public static ExportedProjectFormat Conversation { get; } = new ExportedProjectFormat(ConversationValue); + /// Specifies the format for an application that was exported from LUIS. + public static ExportedProjectFormat Luis { get; } = new ExportedProjectFormat(LuisValue); + /// Determines if two values are the same. + public static bool operator ==(ExportedProjectFormat left, ExportedProjectFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExportedProjectFormat left, ExportedProjectFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExportedProjectFormat(string value) => new ExportedProjectFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExportedProjectFormat other && Equals(other); + /// + public bool Equals(ExportedProjectFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs new file mode 100644 index 000000000000..ab72de03ab0b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedQuestionAnsweringOrchestration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedQuestionAnsweringOrchestration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedQuestionAnsweringOrchestration(document.RootElement, options); + } + + internal static ExportedQuestionAnsweringOrchestration DeserializeExportedQuestionAnsweringOrchestration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedQuestionAnsweringOrchestration(projectName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} does not support writing '{options.Format}' format."); + } + } + + ExportedQuestionAnsweringOrchestration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedQuestionAnsweringOrchestration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedQuestionAnsweringOrchestration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedQuestionAnsweringOrchestration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs new file mode 100644 index 000000000000..af2fa03bda70 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestration.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Defines the orchestration details for a Question Answering project target. + public partial class ExportedQuestionAnsweringOrchestration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the target project. + /// is null. + public ExportedQuestionAnsweringOrchestration(string projectName) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + + ProjectName = projectName; + } + + /// Initializes a new instance of . + /// The name of the target project. + /// Keeps track of any properties unknown to the library. + internal ExportedQuestionAnsweringOrchestration(string projectName, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedQuestionAnsweringOrchestration() + { + } + + /// The name of the target project. + public string ProjectName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..3374fcc738a8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedQuestionAnsweringOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("questionAnsweringOrchestration"u8); + writer.WriteObjectValue(QuestionAnsweringOrchestration, options); + } + + ExportedQuestionAnsweringOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement, options); + } + + internal static ExportedQuestionAnsweringOrchestrationDetails DeserializeExportedQuestionAnsweringOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = default; + OrchestrationTargetProjectKind targetProjectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("questionAnsweringOrchestration"u8)) + { + questionAnsweringOrchestration = ExportedQuestionAnsweringOrchestration.DeserializeExportedQuestionAnsweringOrchestration(property.Value, options); + continue; + } + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedQuestionAnsweringOrchestrationDetails(targetProjectKind, serializedAdditionalRawData, questionAnsweringOrchestration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedQuestionAnsweringOrchestrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedQuestionAnsweringOrchestrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedQuestionAnsweringOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedQuestionAnsweringOrchestrationDetails(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs new file mode 100644 index 000000000000..477f9b366763 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedQuestionAnsweringOrchestrationDetails.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the orchestration options for a Question Answering project target. + public partial class ExportedQuestionAnsweringOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// The Question Answering project details. + /// is null. + public ExportedQuestionAnsweringOrchestrationDetails(ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) + { + Argument.AssertNotNull(questionAnsweringOrchestration, nameof(questionAnsweringOrchestration)); + + TargetProjectKind = OrchestrationTargetProjectKind.QuestionAnswering; + QuestionAnsweringOrchestration = questionAnsweringOrchestration; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The Question Answering project details. + internal ExportedQuestionAnsweringOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData, ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration) : base(targetProjectKind, serializedAdditionalRawData) + { + QuestionAnsweringOrchestration = questionAnsweringOrchestration; + } + + /// Initializes a new instance of for deserialization. + internal ExportedQuestionAnsweringOrchestrationDetails() + { + } + + /// The Question Answering project details. + public ExportedQuestionAnsweringOrchestration QuestionAnsweringOrchestration { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs new file mode 100644 index 000000000000..bde241606e97 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("exportedModelName"u8); + writer.WriteStringValue(ExportedModelName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastExportedModelDateTime"u8); + writer.WriteStringValue(LastExportedModelDateTime, "O"); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + + internal static ExportedTrainedModel DeserializeExportedTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string exportedModelName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastExportedModelDateTime = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportedModelName"u8)) + { + exportedModelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastExportedModelDateTime"u8)) + { + lastExportedModelDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ExportedTrainedModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedTrainedModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.cs new file mode 100644 index 000000000000..6f4b7d525f73 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported trained model. + public partial class ExportedTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// or is null. + internal ExportedTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// Keeps track of any properties unknown to the library. + internal ExportedTrainedModel(string exportedModelName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, IDictionary serializedAdditionalRawData) + { + ExportedModelName = exportedModelName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedTrainedModel() + { + } + + /// The exported model name. + public string ExportedModelName { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The last exported date time of the model. + public DateTimeOffset LastExportedModelDateTime { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.Serialization.cs new file mode 100644 index 000000000000..57b999f1282f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ExportedUtteranceEntityLabel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedUtteranceEntityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedUtteranceEntityLabel(document.RootElement, options); + } + + internal static ExportedUtteranceEntityLabel DeserializeExportedUtteranceEntityLabel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedUtteranceEntityLabel(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support writing '{options.Format}' format."); + } + } + + ExportedUtteranceEntityLabel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedUtteranceEntityLabel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedUtteranceEntityLabel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedUtteranceEntityLabel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedUtteranceEntityLabel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.cs new file mode 100644 index 000000000000..e2c969ccbb38 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedUtteranceEntityLabel.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an entity label for an utterance. + public partial class ExportedUtteranceEntityLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The category of the entity label. + /// Start position for the entity text. + /// Length for the entity text. + /// is null. + public ExportedUtteranceEntityLabel(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// The category of the entity label. + /// Start position for the entity text. + /// Length for the entity text. + /// Keeps track of any properties unknown to the library. + internal ExportedUtteranceEntityLabel(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedUtteranceEntityLabel() + { + } + + /// The category of the entity label. + public string Category { get; } + /// Start position for the entity text. + public int Offset { get; } + /// Length for the entity text. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..3374f0e5bb6c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ImportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportProjectJobState(document.RootElement, options); + } + + internal static ImportProjectJobState DeserializeImportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ImportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs new file mode 100644 index 000000000000..99a71bdd2853 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of an import job. + public partial class ImportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ImportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ImportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.cs new file mode 100644 index 000000000000..8fec0f3a7d94 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.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.Language.Conversations.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct InnerErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InnerErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidParameterValueValue = "InvalidParameterValue"; + private const string KnowledgeBaseNotFoundValue = "KnowledgeBaseNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string ExtractionFailureValue = "ExtractionFailure"; + private const string InvalidRequestBodyFormatValue = "InvalidRequestBodyFormat"; + private const string EmptyRequestValue = "EmptyRequest"; + private const string MissingInputDocumentsValue = "MissingInputDocuments"; + private const string InvalidDocumentValue = "InvalidDocument"; + private const string ModelVersionIncorrectValue = "ModelVersionIncorrect"; + private const string InvalidDocumentBatchValue = "InvalidDocumentBatch"; + private const string UnsupportedLanguageCodeValue = "UnsupportedLanguageCode"; + private const string InvalidCountryHintValue = "InvalidCountryHint"; + + /// InvalidRequest. + public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); + /// InvalidParameterValue. + public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); + /// KnowledgeBaseNotFound. + public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchThrottling. + public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); + /// ExtractionFailure. + public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); + /// InvalidRequestBodyFormat. + public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); + /// EmptyRequest. + public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); + /// MissingInputDocuments. + public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); + /// InvalidDocument. + public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); + /// ModelVersionIncorrect. + public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); + /// InvalidDocumentBatch. + public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); + /// UnsupportedLanguageCode. + public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); + /// InvalidCountryHint. + public static InnerErrorCode InvalidCountryHint { get; } = new InnerErrorCode(InvalidCountryHintValue); + /// Determines if two values are the same. + public static bool operator ==(InnerErrorCode left, InnerErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InnerErrorCode left, InnerErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InnerErrorCode(string value) => new InnerErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InnerErrorCode other && Equals(other); + /// + public bool Equals(InnerErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs new file mode 100644 index 000000000000..3b9e7a409497 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartObject(); + foreach (var item in Details) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Innererror)) + { + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInnerErrorModel(document.RootElement, options); + } + + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InnerErrorCode code = default; + string message = default; + IReadOnlyDictionary details = default; + string target = default; + InnerErrorModel innererror = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new InnerErrorCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"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()); + } + details = dictionary; + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + innererror, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{options.Format}' format."); + } + } + + InnerErrorModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInnerErrorModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InnerErrorModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInnerErrorModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs new file mode 100644 index 000000000000..0be6c1135e2f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + public partial class InnerErrorModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// is null. + internal InnerErrorModel(InnerErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// Keeps track of any properties unknown to the library. + internal InnerErrorModel(InnerErrorCode code, string message, IReadOnlyDictionary details, string target, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + Target = target; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InnerErrorModel() + { + } + + /// One of a server-defined set of error codes. + public InnerErrorCode Code { get; } + /// Error message. + public string Message { get; } + /// Error details. + public IReadOnlyDictionary Details { get; } + /// Error target. + public string Target { get; } + /// An object containing more specific information than the current object about the error. + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..73a89b3fd2d6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class IntentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IntentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntentEvaluationSummary(document.RootElement, options); + } + + internal static IntentEvaluationSummary DeserializeIntentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IntentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + IntentEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIntentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntentEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static IntentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIntentEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.cs new file mode 100644 index 000000000000..ccf4111135df --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The evaluation summary for an intent. + public partial class IntentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal IntentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal IntentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IntentEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..3baff424fa3e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class IntentsEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("intents"u8); + writer.WriteStartObject(); + foreach (var item in Intents) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IntentsEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIntentsEvaluationSummary(document.RootElement, options); + } + + internal static IntentsEvaluationSummary DeserializeIntentsEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary intents = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("intents"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, IntentEvaluationSummary.DeserializeIntentEvaluationSummary(property0.Value, options)); + } + intents = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IntentsEvaluationSummary( + confusionMatrix, + intents, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + IntentsEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeIntentsEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IntentsEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static IntentsEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeIntentsEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.cs new file mode 100644 index 000000000000..ac6b62876b0c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation summary for the project's intents. + public partial class IntentsEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal IntentsEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary intents, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(intents, nameof(intents)); + + ConfusionMatrix = confusionMatrix; + Intents = intents; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + /// Represents the intents evaluation summary. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal IntentsEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary intents, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Intents = intents; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IntentsEvaluationSummary() + { + } + + /// Represents the confusion matrix between two intents (the two intents can be the same). The matrix is between the intent that was labelled and the intent that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the intents evaluation summary. + public IReadOnlyDictionary Intents { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..e87ebd045098 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.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.Language.Conversations.Authoring.Models +{ + /// The JobStatus. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "notStarted"; + private const string RunningValue = "running"; + private const string SucceededValue = "succeeded"; + private const string FailedValue = "failed"; + private const string CancelledValue = "cancelled"; + private const string CancellingValue = "cancelling"; + private const string PartiallyCompletedValue = "partiallyCompleted"; + + /// notStarted. + public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); + /// running. + public static JobStatus Running { get; } = new JobStatus(RunningValue); + /// succeeded. + public static JobStatus Succeeded { get; } = new JobStatus(SucceededValue); + /// failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + /// cancelled. + public static JobStatus Cancelled { get; } = new JobStatus(CancelledValue); + /// cancelling. + public static JobStatus Cancelling { get; } = new JobStatus(CancellingValue); + /// partiallyCompleted. + public static JobStatus PartiallyCompleted { get; } = new JobStatus(PartiallyCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + /// + public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs new file mode 100644 index 000000000000..dc0a7a52e26b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class LoadSnapshotJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadSnapshotJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + + internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{options.Format}' format."); + } + } + + LoadSnapshotJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LoadSnapshotJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLoadSnapshotJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs new file mode 100644 index 000000000000..d36674e9524d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of loading a snapshot job. + public partial class LoadSnapshotJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal LoadSnapshotJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal LoadSnapshotJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoadSnapshotJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs new file mode 100644 index 000000000000..3a59bbd134f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedIntent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Orchestration)) + { + writer.WritePropertyName("orchestration"u8); + writer.WriteObjectValue(Orchestration, options); + } + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OrchestrationExportedIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedIntent(document.RootElement, options); + } + + internal static OrchestrationExportedIntent DeserializeOrchestrationExportedIntent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedOrchestrationDetails orchestration = default; + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("orchestration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orchestration = ExportedOrchestrationDetails.DeserializeExportedOrchestrationDetails(property.Value, options); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedIntent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOrchestrationExportedIntent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedIntent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OrchestrationExportedIntent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedIntent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.cs new file mode 100644 index 000000000000..a76c27e0e8db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedIntent.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an exported intent for an orchestration project. + public partial class OrchestrationExportedIntent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The intent category. + /// is null. + public OrchestrationExportedIntent(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 intent category. + /// Keeps track of any properties unknown to the library. + internal OrchestrationExportedIntent(ExportedOrchestrationDetails orchestration, string category, IDictionary serializedAdditionalRawData) + { + Orchestration = orchestration; + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrchestrationExportedIntent() + { + } + + /// + /// Specifies the behavior of this intent in the orchestration flow. + /// 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 ExportedOrchestrationDetails Orchestration { get; set; } + /// The intent category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..7f1f869f122c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Intents)) + { + writer.WritePropertyName("intents"u8); + writer.WriteStartArray(); + foreach (var item in Intents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Utterances)) + { + writer.WritePropertyName("utterances"u8); + writer.WriteStartArray(); + foreach (var item in Utterances) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + OrchestrationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedProjectAssets(document.RootElement, options); + } + + internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList intents = default; + IList utterances = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("intents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OrchestrationExportedIntent.DeserializeOrchestrationExportedIntent(item, options)); + } + intents = array; + continue; + } + if (property.NameEquals("utterances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OrchestrationExportedUtterance.DeserializeOrchestrationExportedUtterance(item, options)); + } + utterances = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOrchestrationExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new OrchestrationExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs new file mode 100644 index 000000000000..1b4e9d3b238c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the assets of an orchestration project. + public partial class OrchestrationExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public OrchestrationExportedProjectAssets() + { + ProjectKind = ProjectKind.Orchestration; + Intents = new ChangeTrackingList(); + Utterances = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + /// Represents the intents of the project. + /// Represents the utterances of the project. + internal OrchestrationExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList utterances) : base(projectKind, serializedAdditionalRawData) + { + Intents = intents; + Utterances = utterances; + } + + /// Represents the intents of the project. + public IList Intents { get; } + /// Represents the utterances of the project. + public IList Utterances { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.Serialization.cs new file mode 100644 index 000000000000..297969e350eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class OrchestrationExportedUtterance : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent); + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OrchestrationExportedUtterance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrchestrationExportedUtterance(document.RootElement, options); + } + + internal static OrchestrationExportedUtterance DeserializeOrchestrationExportedUtterance(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + string language = default; + string intent = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + intent = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OrchestrationExportedUtterance(text, language, intent, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support writing '{options.Format}' format."); + } + } + + OrchestrationExportedUtterance IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOrchestrationExportedUtterance(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrchestrationExportedUtterance)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OrchestrationExportedUtterance FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOrchestrationExportedUtterance(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.cs new file mode 100644 index 000000000000..a43d5796891a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedUtterance.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents an utterance of an orchestration project. + public partial class OrchestrationExportedUtterance + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The utterance text. + /// The intent of the utterance. + /// or is null. + public OrchestrationExportedUtterance(string text, string intent) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(intent, nameof(intent)); + + Text = text; + Intent = intent; + } + + /// Initializes a new instance of . + /// The utterance text. + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The intent of the utterance. + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal OrchestrationExportedUtterance(string text, string language, string intent, string dataset, IDictionary serializedAdditionalRawData) + { + Text = text; + Language = language; + Intent = intent; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrchestrationExportedUtterance() + { + } + + /// The utterance text. + public string Text { get; } + /// Represents the utterance's language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The intent of the utterance. + public string Intent { get; } + /// The dataset for this utterance. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.cs new file mode 100644 index 000000000000..a0962ca47412 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationTargetProjectKind.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.Language.Conversations.Authoring.Models +{ + /// The OrchestrationTargetProjectKind. + internal readonly partial struct OrchestrationTargetProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OrchestrationTargetProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LuisValue = "Luis"; + private const string ConversationValue = "Conversation"; + private const string QuestionAnsweringValue = "QuestionAnswering"; + + /// Luis. + public static OrchestrationTargetProjectKind Luis { get; } = new OrchestrationTargetProjectKind(LuisValue); + /// Conversation. + public static OrchestrationTargetProjectKind Conversation { get; } = new OrchestrationTargetProjectKind(ConversationValue); + /// QuestionAnswering. + public static OrchestrationTargetProjectKind QuestionAnswering { get; } = new OrchestrationTargetProjectKind(QuestionAnsweringValue); + /// Determines if two values are the same. + public static bool operator ==(OrchestrationTargetProjectKind left, OrchestrationTargetProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OrchestrationTargetProjectKind left, OrchestrationTargetProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OrchestrationTargetProjectKind(string value) => new OrchestrationTargetProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OrchestrationTargetProjectKind other && Equals(other); + /// + public bool Equals(OrchestrationTargetProjectKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs new file mode 100644 index 000000000000..3ed3090a697d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class PrebuiltEntities : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntities)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrebuiltEntities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntities)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntities(document.RootElement, options); + } + + internal static PrebuiltEntities DeserializePrebuiltEntities(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PrebuiltEntity.DeserializePrebuiltEntity(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntities(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrebuiltEntities)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntities IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePrebuiltEntities(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntities)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PrebuiltEntities FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntities(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.cs new file mode 100644 index 000000000000..b391e65ae007 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of the retrieved supported prebuilt entities. + public partial class PrebuiltEntities + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The supported prebuilt entities. + /// is null. + internal PrebuiltEntities(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The supported prebuilt entities. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntities(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntities() + { + } + + /// The supported prebuilt entities. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..053665c47c53 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class PrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("examples"u8); + writer.WriteStringValue(Examples); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntity(document.RootElement, options); + } + + internal static PrebuiltEntity DeserializePrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + string examples = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("examples"u8)) + { + examples = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.cs new file mode 100644 index 000000000000..d0bfaf84131e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntity.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a supported prebuilt entity. + public partial class PrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// , or is null. + internal PrebuiltEntity(string category, string description, string examples) + { + Argument.AssertNotNull(category, nameof(category)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(examples, nameof(examples)); + + Category = category; + Description = description; + Examples = examples; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntity(string category, string description, string examples, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + Examples = examples; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + /// The description. + public string Description { get; } + /// English examples for the entity. + public string Examples { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs new file mode 100644 index 000000000000..0126c905da8f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectDeletionJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectDeletionJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + + internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeletionJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectDeletionJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeletionJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs new file mode 100644 index 000000000000..6a51e6c587e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a project deletion job. + public partial class ProjectDeletionJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ProjectDeletionJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ProjectDeletionJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeletionJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs new file mode 100644 index 000000000000..2cd30a980287 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("assignedResources"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeployment(document.RootElement, options); + } + + internal static ProjectDeployment DeserializeProjectDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + string modelTrainingConfigVersion = default; + IReadOnlyList assignedResources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentResource.DeserializeDeploymentResource(item, options)); + } + assignedResources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeployment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeployment(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.cs new file mode 100644 index 000000000000..ef0a3c0feb3e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeployment.cs @@ -0,0 +1,112 @@ +// 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.Language.Conversations.Authoring.Models +{ + /// Represents a project deployment. + public partial class ProjectDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// , or is null. + internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IEnumerable assignedResources) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + Argument.AssertNotNull(assignedResources, nameof(assignedResources)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources.ToList(); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// Keeps track of any properties unknown to the library. + internal ProjectDeployment(string deploymentName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IReadOnlyList assignedResources, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeployment() + { + } + + /// Represents deployment name. + public string DeploymentName { get; } + /// Represents deployment modelId. + public string ModelId { get; } + /// Represents deployment last trained time. + public DateTimeOffset LastTrainedDateTime { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + /// Represents model training config version. + public string ModelTrainingConfigVersion { get; } + /// Represents the metadata of the assigned Azure resources. + public IReadOnlyList AssignedResources { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.cs new file mode 100644 index 000000000000..d673512f2717 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.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.Language.Conversations.Authoring.Models +{ + /// The ProjectKind. + public readonly partial struct ProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ConversationValue = "Conversation"; + private const string OrchestrationValue = "Orchestration"; + private const string CustomConversationSummarizationValue = "CustomConversationSummarization"; + + /// A project to build natural language into apps, bots, and IoT devices. + public static ProjectKind Conversation { get; } = new ProjectKind(ConversationValue); + /// A project to connect and orchestrate Conversation, Custom question answering and LUIS projects together in one single project. + public static ProjectKind Orchestration { get; } = new ProjectKind(OrchestrationValue); + /// A project to build conversation summarization models which are able to summarize long conversations. + public static ProjectKind CustomConversationSummarization { get; } = new ProjectKind(CustomConversationSummarizationValue); + /// Determines if two values are the same. + public static bool operator ==(ProjectKind left, ProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProjectKind left, ProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProjectKind(string value) => new ProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProjectKind other && Equals(other); + /// + public bool Equals(ProjectKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs new file mode 100644 index 000000000000..1702bef36f89 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastModifiedDateTime"u8); + writer.WriteStringValue(LastModifiedDateTime, "O"); + if (Optional.IsDefined(LastTrainedDateTime)) + { + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime.Value, "O"); + } + if (Optional.IsDefined(LastDeployedDateTime)) + { + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime.Value, "O"); + } + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectMetadata(document.RootElement, options); + } + + internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset createdDateTime = default; + DateTimeOffset lastModifiedDateTime = default; + DateTimeOffset? lastTrainedDateTime = default; + DateTimeOffset? lastDeployedDateTime = default; + ProjectKind projectKind = default; + ProjectSettings settings = default; + string storageInputContainerName = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedDateTime"u8)) + { + lastModifiedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{options.Format}' format."); + } + } + + ProjectMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.cs new file mode 100644 index 000000000000..c8e18988fe7e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectMetadata.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the metadata of a project. + public partial class ProjectMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project kind. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, ProjectKind projectKind, string projectName, string language) + { + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + ProjectKind = projectKind; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project creation datetime. + /// Represents the project last trained datetime. + /// Represents the project last deployed datetime. + /// Represents the project kind. + /// The project settings. + /// The storage container name in case of conversation summarization. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, DateTimeOffset? lastTrainedDateTime, DateTimeOffset? lastDeployedDateTime, ProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + ProjectKind = projectKind; + Settings = settings; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectMetadata() + { + } + + /// Represents the project creation datetime. + public DateTimeOffset CreatedDateTime { get; } + /// Represents the project creation datetime. + public DateTimeOffset LastModifiedDateTime { get; } + /// Represents the project last trained datetime. + public DateTimeOffset? LastTrainedDateTime { get; } + /// Represents the project last deployed datetime. + public DateTimeOffset? LastDeployedDateTime { get; } + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The project settings. + public ProjectSettings Settings { get; } + /// The storage container name in case of conversation summarization. + public string StorageInputContainerName { get; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; } + /// The project description. + public string Description { get; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs new file mode 100644 index 000000000000..7104e28cc936 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confidenceThreshold"u8); + writer.WriteNumberValue(ConfidenceThreshold); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectSettings(document.RootElement, options); + } + + internal static ProjectSettings DeserializeProjectSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float confidenceThreshold = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confidenceThreshold"u8)) + { + confidenceThreshold = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectSettings(confidenceThreshold, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.cs new file mode 100644 index 000000000000..46ad35fa50c9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectSettings.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the settings used to define the project behavior. + public partial class ProjectSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public ProjectSettings(float confidenceThreshold) + { + ConfidenceThreshold = confidenceThreshold; + } + + /// Initializes a new instance of . + /// The threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal ProjectSettings(float confidenceThreshold, IDictionary serializedAdditionalRawData) + { + ConfidenceThreshold = confidenceThreshold; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectSettings() + { + } + + /// The threshold of the intent with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public float ConfidenceThreshold { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs new file mode 100644 index 000000000000..6e7eaa0108c9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ProjectTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastTrainingDurationInSeconds"u8); + writer.WriteNumberValue(LastTrainingDurationInSeconds); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("hasSnapshot"u8); + writer.WriteBooleanValue(HasSnapshot); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + + internal static ProjectTrainedModel DeserializeProjectTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string label = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + int lastTrainingDurationInSeconds = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + bool hasSnapshot = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainingDurationInSeconds"u8)) + { + lastTrainingDurationInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hasSnapshot"u8)) + { + hasSnapshot = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ProjectTrainedModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectTrainedModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.cs new file mode 100644 index 000000000000..1fbc9b616db0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectTrainedModel.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a trained model. + public partial class ProjectTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// or is null. + internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// Keeps track of any properties unknown to the library. + internal ProjectTrainedModel(string label, string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot, IDictionary serializedAdditionalRawData) + { + Label = label; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectTrainedModel() + { + } + + /// The trained model label. + public string Label { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The duration of the model's last training request in seconds. + public int LastTrainingDurationInSeconds { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + /// The flag to indicate if the trained model has a snapshot ready. + public bool HasSnapshot { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs new file mode 100644 index 000000000000..f08f82f6afcf --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class ResourceMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + writer.WritePropertyName("customDomain"u8); + writer.WriteStringValue(CustomDomain); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceMetadata(document.RootElement, options); + } + + internal static ResourceMetadata DeserializeResourceMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string customDomain = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("customDomain"u8)) + { + customDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceMetadata(azureResourceId, customDomain, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{options.Format}' format."); + } + } + + ResourceMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResourceMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.cs new file mode 100644 index 000000000000..906b9992bdf4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ResourceMetadata.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents metadata for the Azure resource.. + public partial class ResourceMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// , or is null. + public ResourceMetadata(string azureResourceId, string customDomain, string region) + { + Argument.AssertNotNull(azureResourceId, nameof(azureResourceId)); + Argument.AssertNotNull(customDomain, nameof(customDomain)); + Argument.AssertNotNull(region, nameof(region)); + + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// Keeps track of any properties unknown to the library. + internal ResourceMetadata(string azureResourceId, string customDomain, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceMetadata() + { + } + + /// Represents the Azure resource ID. + public string AzureResourceId { get; } + /// Represents the Azure resource custom domain. + public string CustomDomain { get; } + /// Represents the Azure resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.cs new file mode 100644 index 000000000000..ad609f62ed3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/StringIndexType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// The StringIndexType. + 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 Utf16CodeUnitValue = "Utf16CodeUnit"; + + /// The offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. + 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 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 != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs new file mode 100644 index 000000000000..34b55b9c7674 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class SubTrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (Optional.IsDefined(StartDateTime)) + { + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartDateTime.Value, "O"); + } + if (Optional.IsDefined(EndDateTime)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SubTrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + + internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int percentComplete = default; + DateTimeOffset? startDateTime = default; + DateTimeOffset? endDateTime = default; + JobStatus status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + SubTrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SubTrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSubTrainingJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs new file mode 100644 index 000000000000..bf95c7414ab8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the detailed state of a training sub-operation. + public partial class SubTrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the status of the sub-operation. + internal SubTrainingJobState(int percentComplete, JobStatus status) + { + PercentComplete = percentComplete; + Status = status; + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// Keeps track of any properties unknown to the library. + internal SubTrainingJobState(int percentComplete, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, JobStatus status, IDictionary serializedAdditionalRawData) + { + PercentComplete = percentComplete; + StartDateTime = startDateTime; + EndDateTime = endDateTime; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SubTrainingJobState() + { + } + + /// Represents progress percentage. + public int PercentComplete { get; } + /// Represents the start date time. + public DateTimeOffset? StartDateTime { get; } + /// Represents the end date time. + public DateTimeOffset? EndDateTime { get; } + /// Represents the status of the sub-operation. + public JobStatus Status { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs new file mode 100644 index 000000000000..b57d25aa07b2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class SupportedLanguage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("languageName"u8); + writer.WriteStringValue(LanguageName); + writer.WritePropertyName("languageCode"u8); + writer.WriteStringValue(LanguageCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SupportedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguage(document.RootElement, options); + } + + internal static SupportedLanguage DeserializeSupportedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string languageName = default; + string languageCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("languageName"u8)) + { + languageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("languageCode"u8)) + { + languageCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSupportedLanguage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SupportedLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.cs new file mode 100644 index 000000000000..cc3293a6b09c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguage.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a supported language. + public partial class SupportedLanguage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal SupportedLanguage(string languageName, string languageCode) + { + Argument.AssertNotNull(languageName, nameof(languageName)); + Argument.AssertNotNull(languageCode, nameof(languageCode)); + + LanguageName = languageName; + LanguageCode = languageCode; + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguage(string languageName, string languageCode, IDictionary serializedAdditionalRawData) + { + LanguageName = languageName; + LanguageCode = languageCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguage() + { + } + + /// The language name. + public string LanguageName { get; } + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string LanguageCode { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs new file mode 100644 index 000000000000..10dfb02e3505 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class SupportedLanguages : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguages)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SupportedLanguages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguages)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguages(document.RootElement, options); + } + + internal static SupportedLanguages DeserializeSupportedLanguages(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SupportedLanguage.DeserializeSupportedLanguage(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguages(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SupportedLanguages)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguages IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSupportedLanguages(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguages)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SupportedLanguages FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguages(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.cs new file mode 100644 index 000000000000..573a75efe97f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of retrieved languages. + public partial class SupportedLanguages + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of the languages. + /// is null. + internal SupportedLanguages(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of the languages. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguages(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguages() + { + } + + /// The list of the languages. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs new file mode 100644 index 000000000000..aaade3a43ce4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class SwapDeploymentsDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstDeploymentName"u8); + writer.WriteStringValue(FirstDeploymentName); + writer.WritePropertyName("secondDeploymentName"u8); + writer.WriteStringValue(SecondDeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SwapDeploymentsDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + + internal static SwapDeploymentsDetails DeserializeSwapDeploymentsDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstDeploymentName = default; + string secondDeploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstDeploymentName"u8)) + { + firstDeploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondDeploymentName"u8)) + { + secondDeploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsDetails(firstDeploymentName, secondDeploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SwapDeploymentsDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs new file mode 100644 index 000000000000..bdada59462ce --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for swapping two deployments together. + public partial class SwapDeploymentsDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// or is null. + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) + { + Argument.AssertNotNull(firstDeploymentName, nameof(firstDeploymentName)); + Argument.AssertNotNull(secondDeploymentName, nameof(secondDeploymentName)); + + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + } + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName, IDictionary serializedAdditionalRawData) + { + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsDetails() + { + } + + /// Represents the first deployment name. + public string FirstDeploymentName { get; } + /// Represents the second deployment name. + public string SecondDeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs new file mode 100644 index 000000000000..11247b186dd9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class SwapDeploymentsJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SwapDeploymentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + + internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SwapDeploymentsJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs new file mode 100644 index 000000000000..23f81396d899 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class SwapDeploymentsJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal SwapDeploymentsJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs new file mode 100644 index 000000000000..7811d7667b24 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingConfigVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersionProperty); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingConfigVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + + internal static TrainingConfigVersion DeserializeTrainingConfigVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainingConfigVersion = default; + DateTimeOffset modelExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersion(trainingConfigVersion, modelExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingConfigVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersion(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.cs new file mode 100644 index 000000000000..17e1509a0e00 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersion.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a training config version. + public partial class TrainingConfigVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// is null. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate) + { + Argument.AssertNotNull(trainingConfigVersionProperty, nameof(trainingConfigVersionProperty)); + + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate, IDictionary serializedAdditionalRawData) + { + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersion() + { + } + + /// Represents the version of the config. + public string TrainingConfigVersionProperty { get; } + /// Represents the training config version expiration date. + public DateTimeOffset ModelExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs new file mode 100644 index 000000000000..b2ca76809d13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingConfigVersions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersions)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingConfigVersions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersions(document.RootElement, options); + } + + internal static TrainingConfigVersions DeserializeTrainingConfigVersions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TrainingConfigVersion.DeserializeTrainingConfigVersion(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersions(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingConfigVersions)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingConfigVersions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingConfigVersions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersions(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.cs new file mode 100644 index 000000000000..e9843b7eec26 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.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 System.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents a list of training config versions. + public partial class TrainingConfigVersions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of the training config versions. + /// is null. + internal TrainingConfigVersions(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of the training config versions. + /// The next page link. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersions(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersions() + { + } + + /// The list of the training config versions. + public IReadOnlyList Value { get; } + /// The next page link. + public string NextLink { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs new file mode 100644 index 000000000000..523f1676b7c8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + if (Optional.IsDefined(TrainingConfigVersion)) + { + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + } + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.ToString()); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + + internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + TrainingMode trainingMode = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingMode"u8)) + { + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobDetails(modelLabel, trainingConfigVersion, trainingMode, evaluationOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.cs new file mode 100644 index 000000000000..3feb12923271 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobDetails.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the options for starting a new training job. + public partial class TrainingJobDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents the mode of the training operation. + /// is null. + public TrainingJobDetails(string modelLabel, TrainingMode trainingMode) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + + ModelLabel = modelLabel; + TrainingMode = trainingMode; + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + /// Represents the mode of the training operation. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Keeps track of any properties unknown to the library. + internal TrainingJobDetails(string modelLabel, string trainingConfigVersion, TrainingMode trainingMode, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingMode = trainingMode; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobDetails() + { + } + + /// Represents the output model label. + public string ModelLabel { get; } + /// Represents training config version. By default, "latest" value is used which uses the latest released training config version. + public string TrainingConfigVersion { get; set; } + /// Represents the mode of the training operation. + public TrainingMode TrainingMode { get; } + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + public EvaluationDetails EvaluationOptions { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs new file mode 100644 index 000000000000..583091695fdd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + if (Optional.IsDefined(TrainingMode)) + { + writer.WritePropertyName("trainingMode"u8); + writer.WriteStringValue(TrainingMode.Value.ToString()); + } + writer.WritePropertyName("trainingStatus"u8); + writer.WriteObjectValue(TrainingStatus, options); + if (Optional.IsDefined(EvaluationStatus)) + { + writer.WritePropertyName("evaluationStatus"u8); + writer.WriteObjectValue(EvaluationStatus, options); + } + if (Optional.IsDefined(EstimatedEndDateTime)) + { + writer.WritePropertyName("estimatedEndDateTime"u8); + writer.WriteStringValue(EstimatedEndDateTime.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobResult(document.RootElement, options); + } + + internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + TrainingMode? trainingMode = default; + SubTrainingJobState trainingStatus = default; + SubTrainingJobState evaluationStatus = default; + DateTimeOffset? estimatedEndDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingMode = new TrainingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingStatus"u8)) + { + trainingStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("evaluationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("estimatedEndDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedEndDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingMode, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.cs new file mode 100644 index 000000000000..720a34cb1f3a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobResult.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the output of a training job. + public partial class TrainingJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the model training status. + /// , or is null. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + Argument.AssertNotNull(trainingStatus, nameof(trainingStatus)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents the mode of the training operation. + /// Represents the model training status. + /// Represents model evaluation status. + /// Represents the estimated end date time for training and evaluation. + /// Keeps track of any properties unknown to the library. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, TrainingMode? trainingMode, SubTrainingJobState trainingStatus, SubTrainingJobState evaluationStatus, DateTimeOffset? estimatedEndDateTime, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingMode = trainingMode; + TrainingStatus = trainingStatus; + EvaluationStatus = evaluationStatus; + EstimatedEndDateTime = estimatedEndDateTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobResult() + { + } + + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents the mode of the training operation. + public TrainingMode? TrainingMode { get; } + /// Represents the model training status. + public SubTrainingJobState TrainingStatus { get; } + /// Represents model evaluation status. + public SubTrainingJobState EvaluationStatus { get; } + /// Represents the estimated end date time for training and evaluation. + public DateTimeOffset? EstimatedEndDateTime { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs new file mode 100644 index 000000000000..00058b957bf1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class TrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobState(document.RootElement, options); + } + + internal static TrainingJobState DeserializeTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + TrainingJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = TrainingJobResult.DeserializeTrainingJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs new file mode 100644 index 000000000000..882cd133cc27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the state of a training job. + public partial class TrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents training tasks detailed result. + /// is null. + internal TrainingJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, TrainingJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// Keeps track of any properties unknown to the library. + internal TrainingJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, TrainingJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents training tasks detailed result. + public TrainingJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.cs new file mode 100644 index 000000000000..8b3ba74604b3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.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.Language.Conversations.Authoring.Models +{ + /// The TrainingMode. + public readonly partial struct TrainingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TrainingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AdvancedValue = "advanced"; + private const string StandardValue = "standard"; + + /// Trains using fine-tuned neural network transformer models. Can train multilingual projects. + public static TrainingMode Advanced { get; } = new TrainingMode(AdvancedValue); + /// Faster training times for quicker iterations. + public static TrainingMode Standard { get; } = new TrainingMode(StandardValue); + /// Determines if two values are the same. + public static bool operator ==(TrainingMode left, TrainingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TrainingMode left, TrainingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TrainingMode(string value) => new TrainingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TrainingMode other && Equals(other); + /// + public bool Equals(TrainingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..3cfb3cb12330 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class UnassignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UnassignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static UnassignDeploymentResourcesDetails DeserializeUnassignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnassignDeploymentResourcesDetails(assignedResourceIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + UnassignDeploymentResourcesDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnassignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..9ef1677d4971 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// 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.Language.Conversations.Authoring.Models +{ + /// Represents the options to unassign Azure resources from a project. + public partial class UnassignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// is null. + public UnassignDeploymentResourcesDetails(IEnumerable assignedResourceIds) + { + Argument.AssertNotNull(assignedResourceIds, nameof(assignedResourceIds)); + + AssignedResourceIds = assignedResourceIds.ToList(); + } + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesDetails() + { + } + + /// Represents the assigned resource IDs to be unassigned. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.Serialization.cs new file mode 100644 index 000000000000..1abe78c47979 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + internal partial class UnknownExportedOrchestrationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedOrchestrationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + + internal static UnknownExportedOrchestrationDetails DeserializeUnknownExportedOrchestrationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OrchestrationTargetProjectKind targetProjectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetProjectKind"u8)) + { + targetProjectKind = new OrchestrationTargetProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedOrchestrationDetails(targetProjectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedOrchestrationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedOrchestrationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedOrchestrationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownExportedOrchestrationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedOrchestrationDetails(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.cs new file mode 100644 index 000000000000..58340d0dec0e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedOrchestrationDetails.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Unknown version of ExportedOrchestrationDetails. + internal partial class UnknownExportedOrchestrationDetails : ExportedOrchestrationDetails + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownExportedOrchestrationDetails(OrchestrationTargetProjectKind targetProjectKind, IDictionary serializedAdditionalRawData) : base(targetProjectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedOrchestrationDetails() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..90fd010370fe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + internal partial class UnknownExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedProjectAssets(projectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs new file mode 100644 index 000000000000..8a716c535450 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Unknown version of ExportedProjectAssets. + internal partial class UnknownExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + /// The type of project containing the assets. + /// Keeps track of any properties unknown to the library. + internal UnknownExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) : base(projectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedProjectAssets() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..f55c429bbe87 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceEntitiesEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedEntities"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedEntities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedEntities"u8); + writer.WriteStartArray(); + foreach (var item in PredictedEntities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UtteranceEntitiesEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEntitiesEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEntitiesEvaluationResult DeserializeUtteranceEntitiesEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedEntities = default; + IReadOnlyList predictedEntities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UtteranceEntityEvaluationResult.DeserializeUtteranceEntityEvaluationResult(item, options)); + } + expectedEntities = array; + continue; + } + if (property.NameEquals("predictedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UtteranceEntityEvaluationResult.DeserializeUtteranceEntityEvaluationResult(item, options)); + } + predictedEntities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEntitiesEvaluationResult(expectedEntities, predictedEntities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEntitiesEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUtteranceEntitiesEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEntitiesEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UtteranceEntitiesEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEntitiesEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.cs new file mode 100644 index 000000000000..a504ec9990ed --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntitiesEvaluationResult.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.Linq; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the comparison between the expected and predicted entities for an utterance. + public partial class UtteranceEntitiesEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// or is null. + internal UtteranceEntitiesEvaluationResult(IEnumerable expectedEntities, IEnumerable predictedEntities) + { + Argument.AssertNotNull(expectedEntities, nameof(expectedEntities)); + Argument.AssertNotNull(predictedEntities, nameof(predictedEntities)); + + ExpectedEntities = expectedEntities.ToList(); + PredictedEntities = predictedEntities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the expected entity labels. + /// Represents the predicted entity labels. + /// Keeps track of any properties unknown to the library. + internal UtteranceEntitiesEvaluationResult(IReadOnlyList expectedEntities, IReadOnlyList predictedEntities, IDictionary serializedAdditionalRawData) + { + ExpectedEntities = expectedEntities; + PredictedEntities = predictedEntities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEntitiesEvaluationResult() + { + } + + /// Represents the expected entity labels. + public IReadOnlyList ExpectedEntities { get; } + /// Represents the predicted entity labels. + public IReadOnlyList PredictedEntities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..e5e3ea816f22 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceEntityEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UtteranceEntityEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEntityEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEntityEvaluationResult DeserializeUtteranceEntityEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEntityEvaluationResult(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEntityEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUtteranceEntityEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEntityEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UtteranceEntityEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEntityEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.cs new file mode 100644 index 000000000000..c27307848f49 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEntityEvaluationResult.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; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation output of an entity label or prediction. + public partial class UtteranceEntityEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// is null. + internal UtteranceEntityEvaluationResult(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// Keeps track of any properties unknown to the library. + internal UtteranceEntityEvaluationResult(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEntityEvaluationResult() + { + } + + /// Represents the entity category. + public string Category { get; } + /// Represents the entity offset index relative to the original text. + public int Offset { get; } + /// Represents the entity length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..d6d92cff97e9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("entitiesResult"u8); + writer.WriteObjectValue(EntitiesResult, options); + writer.WritePropertyName("intentsResult"u8); + writer.WriteObjectValue(IntentsResult, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UtteranceEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceEvaluationResult(document.RootElement, options); + } + + internal static UtteranceEvaluationResult DeserializeUtteranceEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + string language = default; + UtteranceEntitiesEvaluationResult entitiesResult = default; + UtteranceIntentsEvaluationResult intentsResult = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("entitiesResult"u8)) + { + entitiesResult = UtteranceEntitiesEvaluationResult.DeserializeUtteranceEntitiesEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("intentsResult"u8)) + { + intentsResult = UtteranceIntentsEvaluationResult.DeserializeUtteranceIntentsEvaluationResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceEvaluationResult(text, language, entitiesResult, intentsResult, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUtteranceEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UtteranceEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs new file mode 100644 index 000000000000..5c27863f44f3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceEvaluationResult.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the evaluation result for an utterance. + public partial class UtteranceEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// , or is null. + internal UtteranceEvaluationResult(string language, UtteranceEntitiesEvaluationResult entitiesResult, UtteranceIntentsEvaluationResult intentsResult) + { + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(entitiesResult, nameof(entitiesResult)); + Argument.AssertNotNull(intentsResult, nameof(intentsResult)); + + Language = language; + EntitiesResult = entitiesResult; + IntentsResult = intentsResult; + } + + /// Initializes a new instance of . + /// Represents the utterance text. + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the entities results for the utterance. + /// Represents the intents results for the utterance. + /// Keeps track of any properties unknown to the library. + internal UtteranceEvaluationResult(string text, string language, UtteranceEntitiesEvaluationResult entitiesResult, UtteranceIntentsEvaluationResult intentsResult, IDictionary serializedAdditionalRawData) + { + Text = text; + Language = language; + EntitiesResult = entitiesResult; + IntentsResult = intentsResult; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceEvaluationResult() + { + } + + /// Represents the utterance text. + public string Text { get; } + /// Represents the utterance language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + /// Represents the entities results for the utterance. + public UtteranceEntitiesEvaluationResult EntitiesResult { get; } + /// Represents the intents results for the utterance. + public UtteranceIntentsEvaluationResult IntentsResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..6f3f6c548477 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + public partial class UtteranceIntentsEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedIntent"u8); + writer.WriteStringValue(ExpectedIntent); + writer.WritePropertyName("predictedIntent"u8); + writer.WriteStringValue(PredictedIntent); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UtteranceIntentsEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUtteranceIntentsEvaluationResult(document.RootElement, options); + } + + internal static UtteranceIntentsEvaluationResult DeserializeUtteranceIntentsEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string expectedIntent = default; + string predictedIntent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedIntent"u8)) + { + expectedIntent = property.Value.GetString(); + continue; + } + if (property.NameEquals("predictedIntent"u8)) + { + predictedIntent = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UtteranceIntentsEvaluationResult(expectedIntent, predictedIntent, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + UtteranceIntentsEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUtteranceIntentsEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UtteranceIntentsEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UtteranceIntentsEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUtteranceIntentsEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.cs new file mode 100644 index 000000000000..73d8e7f4ee43 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UtteranceIntentsEvaluationResult.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Authoring.Models +{ + /// Represents the comparison between the expected and the predicted intent for an utterance. + public partial class UtteranceIntentsEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// or is null. + internal UtteranceIntentsEvaluationResult(string expectedIntent, string predictedIntent) + { + Argument.AssertNotNull(expectedIntent, nameof(expectedIntent)); + Argument.AssertNotNull(predictedIntent, nameof(predictedIntent)); + + ExpectedIntent = expectedIntent; + PredictedIntent = predictedIntent; + } + + /// Initializes a new instance of . + /// Represents the utterance's expected intent. + /// Represents the utterance's predicted intent. + /// Keeps track of any properties unknown to the library. + internal UtteranceIntentsEvaluationResult(string expectedIntent, string predictedIntent, IDictionary serializedAdditionalRawData) + { + ExpectedIntent = expectedIntent; + PredictedIntent = predictedIntent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UtteranceIntentsEvaluationResult() + { + } + + /// Represents the utterance's expected intent. + public string ExpectedIntent { get; } + /// Represents the utterance's predicted intent. + public string PredictedIntent { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Properties/AssemblyInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..43e490abb7c2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.AI.Language.Conversations.Authoring.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj new file mode 100644 index 000000000000..dc30297c67de --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Azure.AI.Language.Conversations.Authoring.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs new file mode 100644 index 000000000000..bc4759b14658 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs @@ -0,0 +1,6466 @@ +// 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.AI.Language.Conversations.Authoring.Models; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Conversations.Authoring.Samples +{ + public partial class Samples_AnalyzeConversationAuthoring + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + projectName = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + projectName = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_CreateProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProjectAuthorization_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("entities").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("confusionMatrix").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("f1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("precision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("recall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("truePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("trueNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falsePositiveCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("intents").GetProperty("").GetProperty("falseNegativeCount").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("microRecall").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroF1").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroPrecision").ToString()); + Console.WriteLine(result.GetProperty("intentsEvaluation").GetProperty("macroRecall").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetModelEvaluationSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetProjectDeletionStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignedResourceDeployments(top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetAssignedResourceDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignedResourceDeploymentsAsync(top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("languageCode").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedLanguages(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedLanguages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedLanguagesAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities("", "", 1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync("", "", 1234, 1234, 1234, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("examples").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSupportedPrebuiltEntities(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetSupportedPrebuiltEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSupportedPrebuiltEntitiesAsync(language: "", multilingual: "", top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync("Conversation"); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync("Conversation", top: 1234, skip: 1234, maxpagesize: 1234); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("nextLink").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingConfigVersions(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_GetTrainingConfigVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingConfigVersionsAsync(ProjectKind.Conversation, top: 1234, skip: 1234, maxpagesize: 1234); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("text").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("expectedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("entitiesResult").GetProperty("predictedEntities")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("expectedIntent").ToString()); + Console.WriteLine(result.GetProperty("intentsResult").GetProperty("predictedIntent").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CopyProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Export_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Export_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: ExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + projectName = "", + language = "", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); + Operation operation = client.Import(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "")); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { +new +{ +category = "", +} + }, + entities = new object[] + { +new +{ +category = "", +compositionSetting = "returnLongestOverlap", +list = new +{ +sublists = new object[] +{ +new +{ +listKey = "", +synonyms = new object[] +{ +new +{ +language = "", +values = new object[] +{ +"" +}, +} +}, +} +}, +}, +prebuilts = new object[] +{ +new +{ +category = "", +} +}, +regex = new +{ +expressions = new object[] +{ +new +{ +regexKey = "", +language = "", +regexPattern = "", +} +}, +}, +requiredComponents = new object[] +{ +"" +}, +} + }, + utterances = new object[] + { +new +{ +entities = new object[] +{ +new +{ +category = "", +offset = 1234, +length = 1234, +} +}, +text = "", +language = "", +intent = "", +dataset = "", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "Conversation", + settings = new + { + confidenceThreshold = 123.45F, + }, + storageInputContainerName = "", + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + intents = new object[] + { +new +{ +category = "", +} + }, + entities = new object[] + { +new +{ +category = "", +compositionSetting = "returnLongestOverlap", +list = new +{ +sublists = new object[] +{ +new +{ +listKey = "", +synonyms = new object[] +{ +new +{ +language = "", +values = new object[] +{ +"" +}, +} +}, +} +}, +}, +prebuilts = new object[] +{ +new +{ +category = "", +} +}, +regex = new +{ +expressions = new object[] +{ +new +{ +regexKey = "", +language = "", +regexPattern = "", +} +}, +}, +requiredComponents = new object[] +{ +"" +}, +} + }, + utterances = new object[] + { +new +{ +entities = new object[] +{ +new +{ +category = "", +offset = 1234, +length = 1234, +} +}, +text = "", +language = "", +intent = "", +dataset = "", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Import_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionSetting = CompositionSetting.ReturnLongestOverlap, +List = new ExportedEntityList +{ +Sublists = {new ExportedEntitySublist +{ +ListKey = "", +Synonyms = {new ExportedEntityListSynonym +{ +Language = "", +Values = {""}, +}}, +}}, +}, +Prebuilts = {new ExportedPrebuiltEntity("")}, +Regex = new ExportedEntityRegex +{ +Expressions = {new ExportedEntityRegexExpression +{ +RegexKey = "", +Language = "", +RegexPattern = "", +}}, +}, +RequiredComponents = {""}, +}}, + Utterances = {new ConversationExportedUtterance("", "") +{ +Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = client.Import(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Import_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAssets + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionSetting = CompositionSetting.ReturnLongestOverlap, +List = new ExportedEntityList +{ +Sublists = {new ExportedEntitySublist +{ +ListKey = "", +Synonyms = {new ExportedEntityListSynonym +{ +Language = "", +Values = {""}, +}}, +}}, +}, +Prebuilts = {new ExportedPrebuiltEntity("")}, +Regex = new ExportedEntityRegex +{ +Expressions = {new ExportedEntityRegexExpression +{ +RegexKey = "", +Language = "", +RegexPattern = "", +}}, +}, +RequiredComponents = {""}, +}}, + Utterances = {new ConversationExportedUtterance("", "") +{ +Entities = {new ExportedUtteranceEntityLabel("", 1234, 1234)}, +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, exportedProjectFormat: ExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingMode = "advanced", + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingMode = "advanced", + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + trainingMode = "advanced", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_Train_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_Train_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", TrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_SwapDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeployProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_EvaluateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_LoadSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_LoadSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_LoadSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_LoadSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_AssignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_UnassignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingMode").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CancelTrainingJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_DeleteExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_DeleteExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AnalyzeConversationAuthoring client = new AuthoringClient(endpoint, credential).GetAnalyzeConversationAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml new file mode 100644 index 000000000000..f5520384116d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeConversations-authoring +commit: 09d4b1d3355e728ae0de3751b0be6a604a84e1c8 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.sln b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.sln new file mode 100644 index 000000000000..120d49becbbe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Azure.AI.Language.Text.Authoring.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Text.Authoring", "src\Azure.AI.Language.Text.Authoring.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Language.Text.Authoring.Tests", "tests\Azure.AI.Language.Text.Authoring.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 + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {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 + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.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/cognitivelanguage/Azure.AI.Language.Text.Authoring/CHANGELOG.md b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/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/cognitivelanguage/Azure.AI.Language.Text.Authoring/Directory.Build.props b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md new file mode 100644 index 000000000000..ffcfdb18ad35 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Language.Text.Authoring client library for .NET + +Azure.AI.Language.Text.Authoring 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/cognitivelanguage/Azure.AI.Language.Text.Authoring/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.AI.Language.Text.Authoring --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. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## 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/cognitivelanguage/Azure.AI.Language.Text.Authoring/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/cognitivelanguage/Azure.AI.Language.Text.Authoring/README.png) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs new file mode 100644 index 000000000000..f81955b6014e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.net8.0.cs @@ -0,0 +1,1897 @@ +namespace Azure.AI.Language.Text.Authoring +{ + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Text.Authoring.TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } + public partial class TextAnalysisAuthoring + { + protected TextAnalysisAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelManifestAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } +} +namespace Azure.AI.Language.Text.Authoring.Models +{ + public static partial class AILanguageTextAuthoringModelFactory + { + public static Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult customHealthcareResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult customTextSentimentResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary customTextSentimentEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind kind = default(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind), string resourceId = null, string deploymentName = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null, int regionOffset = 0, int regionLength = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(System.Collections.Generic.IEnumerable expectedClasses = null, System.Collections.Generic.IEnumerable predictedClasses = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment category = default(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment), int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(System.Collections.Generic.IEnumerable expectedSentimentSpans = null, System.Collections.Generic.IEnumerable predictedSentimentSpans = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationSummary EvaluationSummary(string projectKind = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest ExportedModelManifest(System.Collections.Generic.IEnumerable modelFiles = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Text.Authoring.Models.StringIndexType), Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ModelFile ModelFile(string name = null, System.Uri contentUri = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary sentiments = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError TextAnalysisAuthoringError(Azure.AI.Language.Text.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary TextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings dataGenerationSettings = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.CompositionSetting 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.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult CustomHealthcareResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationConnectionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationConnectionInfo(string resourceId, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind Kind { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationConnectionInfoKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationConnectionInfoKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind 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.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataGenerationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationSettings(bool enableDataGeneration, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo dataGenerationConnectionInfo) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo { get { throw null; } } + public bool EnableDataGeneration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityLabelEvaluationResult() { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRecognitionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRecognitionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRegionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRegionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + public int RegionLength { get { throw null; } } + public int RegionOffset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DocumentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentEvaluationResult(string location, string language) { } + public string Language { get { throw null; } } + public string Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentHealthcareEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentHealthcareEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentMultiLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentMultiLabelClassificationEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedClasses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedClasses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSentimentLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSentimentLabelEvaluationResult() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSingleLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSingleLabelClassificationEvaluationResult() { } + public string ExpectedClass { get { throw null; } } + public string PredictedClass { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentTextSentimentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentTextSentimentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedSentimentSpans { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedSentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityRecognitionEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityRecognitionEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ErrorCode 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.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.EvaluationKind 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.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions) { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCompositeEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCompositeEntity() { } + public string Category { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string SummaryLocation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationDocument() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationDocument() { } + public Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass Class { get { throw null; } set { } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentDocument() { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IList SentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityLabel() { } + public string Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityRegion() { } + public System.Collections.Generic.IList Labels { get { throw null; } } + public int? RegionLength { get { throw null; } set { } } + public int? RegionOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentSentimentLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentSentimentLabel() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment? Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntity() { } + public string Category { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelManifest() { } + public System.Collections.Generic.IReadOnlyList ModelFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode 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.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.JobStatus 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.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelFile() { } + public System.Uri ContentUri { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomAbstractiveSummarization { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomEntityRecognition { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomHealthcare { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomMultiLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomSingleLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomTextSentiment { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ProjectKind 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.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings() { } + public string AmlProjectPath { get { throw null; } set { } } + public float? ConfidenceThreshold { get { throw null; } set { } } + public int? GptPredictiveLookahead { get { throw null; } set { } } + public bool? IsLabelingLocked { get { throw null; } set { } } + public bool? RunGptPredictions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SentimentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SpanSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SpanSentimentEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Sentiments { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Language.Text.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextAnalysisAuthoringError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringError() { } + public Azure.AI.Language.Text.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TextAnalysisAuthoringSentiment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextAnalysisAuthoringSentiment(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Negative { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Neutral { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Positive { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment 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.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TextAnalysisAuthoringWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextSentimentEvaluationSummary() { } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings DataGenerationSettings { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UnassignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs new file mode 100644 index 000000000000..f81955b6014e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/api/Azure.AI.Language.Text.Authoring.netstandard2.0.cs @@ -0,0 +1,1897 @@ +namespace Azure.AI.Language.Text.Authoring +{ + public partial class AuthoringClient + { + protected AuthoringClient() { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public AuthoringClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Language.Text.Authoring.AuthoringClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.AI.Language.Text.Authoring.TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") { throw null; } + } + public partial class AuthoringClientOptions : Azure.Core.ClientOptions + { + public AuthoringClientOptions(Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion version = Azure.AI.Language.Text.Authoring.AuthoringClientOptions.ServiceVersion.V2024_11_15_Preview) { } + public enum ServiceVersion + { + V2023_04_01 = 1, + V2023_04_15_Preview = 2, + V2024_11_15_Preview = 3, + } + } + public partial class TextAnalysisAuthoring + { + protected TextAnalysisAuthoring() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation AssignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AssignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Operation CancelTrainingJob(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> CancelTrainingJobAsync(Azure.WaitUntil waitUntil, string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CopyProject(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CopyProjectAuthorization(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CopyProjectAuthorizationAsync(string projectName, Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CopyProjectAuthorizationAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation CreateOrUpdateExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateProject(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateProjectAsync(string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeployment(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeleteDeploymentFromResources(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteDeploymentFromResourcesAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteExportedModel(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteExportedModelAsync(Azure.WaitUntil waitUntil, string projectName, string exportedModelName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeleteProject(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteProjectAsync(Azure.WaitUntil waitUntil, string projectName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation DeployProject(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployProjectAsync(Azure.WaitUntil waitUntil, string projectName, string deploymentName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation EvaluateModel(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluateModelAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Export(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportAsync(Azure.WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetAssignedResourceDeployments(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCopyProjectStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCopyProjectStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCopyProjectStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string projectName, string deploymentName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string projectName, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeploymentResources(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDeployments(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModel(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportedModelManifest(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportedModelManifestAsync(string projectName, string exportedModelName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetExportedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetExportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetImportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetImportStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetImportStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectAsync(string projectName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetProjectDeletionStatus(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetProjectDeletionStatusAsync(string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectDeletionStatusAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetProjects(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetProjectsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedPrebuiltEntities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedPrebuiltEntitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetSwapDeploymentsStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetSwapDeploymentsStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainedModel(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainedModelAsync(string projectName, string trainedModelLabel, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainedModels(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(Azure.AI.Language.Text.Authoring.Models.ProjectKind? projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind?), int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTrainingJobs(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTrainingStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTrainingStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrainingStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Import(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.ExportedProject body, string format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ImportAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, string format = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation LoadSnapshot(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task LoadSnapshotAsync(Azure.WaitUntil waitUntil, string projectName, string trainedModelLabel, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation SwapDeployments(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task SwapDeploymentsAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation Train(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TrainAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation UnassignDeploymentResources(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnassignDeploymentResourcesAsync(Azure.WaitUntil waitUntil, string projectName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } +} +namespace Azure.AI.Language.Text.Authoring.Models +{ + public static partial class AILanguageTextAuthoringModelFactory + { + public static Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, System.Collections.Generic.IEnumerable deploymentsMetadata = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = 0f, float rawValue = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow ConfusionMatrixRow(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState CopyProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, System.Collections.Generic.IEnumerable assignedResourceIds = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult customHealthcareResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult customTextSentimentResult = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary customTextSentimentEvaluation = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind kind = default(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind), string resourceId = null, string deploymentName = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentJobState DeploymentJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DeploymentResource DeploymentResource(string resourceId = null, string region = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(System.Collections.Generic.IEnumerable expectedEntities = null, System.Collections.Generic.IEnumerable predictedEntities = null, int regionOffset = 0, int regionLength = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(System.Collections.Generic.IEnumerable entities = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(System.Collections.Generic.IEnumerable expectedClasses = null, System.Collections.Generic.IEnumerable predictedClasses = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment category = default(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment), int offset = 0, int length = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(System.Collections.Generic.IEnumerable expectedSentimentSpans = null, System.Collections.Generic.IEnumerable predictedSentimentSpans = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary EntityEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary entities = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult EvaluationJobResult(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationJobState EvaluationJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationSummary EvaluationSummary(string projectKind = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState ExportedModelJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest ExportedModelManifest(System.Collections.Generic.IEnumerable modelFiles = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedProject ExportedProject(string projectFileVersion = null, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType = default(Azure.AI.Language.Text.Authoring.Models.StringIndexType), Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata = null, Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets assets = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastExportedModelDateTime = default(System.DateTimeOffset), System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState ExportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, string resultUrl = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState ImportProjectJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorModel InnerErrorModel(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode), string message = null, System.Collections.Generic.IReadOnlyDictionary details = null, string target = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ModelFile ModelFile(string name = null, System.Uri contentUri = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastDeployedDateTime = default(System.DateTimeOffset), System.DateTimeOffset deploymentExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, System.Collections.Generic.IEnumerable assignedResources = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectMetadata ProjectMetadata(System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastModifiedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? lastTrainedDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastDeployedDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind = default(Azure.AI.Language.Text.Authoring.Models.ProjectKind), string storageInputContainerName = null, Azure.AI.Language.Text.Authoring.Models.ProjectSettings settings = null, string projectName = null, bool? multilingual = default(bool?), string description = null, string language = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, System.DateTimeOffset lastTrainedDateTime = default(System.DateTimeOffset), int lastTrainingDurationInSeconds = 0, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset), string modelTrainingConfigVersion = null, bool hasSnapshot = false) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = 0, double precision = 0, double recall = 0, int truePositiveCount = 0, int trueNegativeCount = 0, int falsePositiveCount = 0, int falseNegativeCount = 0) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary classes = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix confusionMatrix = null, System.Collections.Generic.IReadOnlyDictionary sentiments = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState SubTrainingJobState(int percentComplete = 0, System.DateTimeOffset? startDateTime = default(System.DateTimeOffset?), System.DateTimeOffset? endDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError TextAnalysisAuthoringError(Azure.AI.Language.Text.Authoring.Models.ErrorCode code = default(Azure.AI.Language.Text.Authoring.Models.ErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.Authoring.Models.InnerErrorModel innererror = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary TextSentimentEvaluationSummary(Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = 0f, float microPrecision = 0f, float microRecall = 0f, float macroF1 = 0f, float macroPrecision = 0f, float macroRecall = 0f) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, System.DateTimeOffset modelExpirationDate = default(System.DateTimeOffset)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions = null, Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings dataGenerationSettings = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState trainingStatus = null, Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState evaluationStatus = null, System.DateTimeOffset? estimatedEndDateTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TrainingJobState TrainingJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.Authoring.Models.TrainingJobResult result = null) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdatedDateTime = default(System.DateTimeOffset), System.DateTimeOffset? expirationDateTime = default(System.DateTimeOffset?), Azure.AI.Language.Text.Authoring.Models.JobStatus status = default(Azure.AI.Language.Text.Authoring.Models.JobStatus), System.Collections.Generic.IEnumerable warnings = null, System.Collections.Generic.IEnumerable errors = null) { throw null; } + } + public partial class AssignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable resourcesMetadata) { } + public System.Collections.Generic.IList ResourcesMetadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedDeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedDeploymentResource() { } + public string AzureResourceId { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedDeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentMetadata() { } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssignedProjectDeploymentsMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssignedProjectDeploymentsMetadata() { } + public System.Collections.Generic.IReadOnlyList DeploymentsMetadata { get { throw null; } } + public string ProjectName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.AssignedProjectDeploymentsMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CompositionSetting : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CompositionSetting(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting CombineComponents { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.CompositionSetting SeparateComponents { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.CompositionSetting 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.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.CompositionSetting (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.CompositionSetting left, Azure.AI.Language.Text.Authoring.Models.CompositionSetting right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ConfusionMatrix : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrix() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixCell : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixCell() { } + public float NormalizedValue { get { throw null; } } + public float RawValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixCell System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConfusionMatrixRow : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ConfusionMatrixRow() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ConfusionMatrixRow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CopyProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string targetProjectName, string accessToken, System.DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { } + public string AccessToken { get { throw null; } set { } } + public System.DateTimeOffset ExpiresAt { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } set { } } + public string TargetProjectName { get { throw null; } set { } } + public string TargetResourceId { get { throw null; } set { } } + public string TargetResourceRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CopyProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CopyProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CopyProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateDeploymentDetails(string trainedModelLabel) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateProjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateProjectDetails(Azure.AI.Language.Text.Authoring.Models.ProjectKind projectKind, string storageInputContainerName, string projectName, string language) { } + public string Description { get { throw null; } set { } } + public string Language { get { throw null; } } + public bool? Multilingual { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } set { } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomEntityRecognitionEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomEntityRecognitionEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomEntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult CustomHealthcareResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomHealthcareEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomHealthcareEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomHealthcareEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomMultiLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomMultiLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomMultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomSingleLabelClassificationEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomSingleLabelClassificationEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomSingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentDocumentEvaluationResult : Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentDocumentEvaluationResult() : base (default(string), default(string)) { } + public Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentDocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomTextSentimentEvaluationSummary : Azure.AI.Language.Text.Authoring.Models.EvaluationSummary, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CustomTextSentimentEvaluationSummary() : base (default(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails)) { } + public Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.CustomTextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationConnectionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationConnectionInfo(string resourceId, string deploymentName) { } + public string DeploymentName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind Kind { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationConnectionInfoKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationConnectionInfoKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind 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.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind left, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfoKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataGenerationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationSettings(bool enableDataGeneration, Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo dataGenerationConnectionInfo) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationConnectionInfo DataGenerationConnectionInfo { get { throw null; } } + public bool EnableDataGeneration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeleteDeploymentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeleteDeploymentDetails() { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeleteDeploymentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentDeleteFromResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentDeleteFromResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentDeleteFromResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentResource() { } + public string Region { get { throw null; } } + public string ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DeploymentResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityLabelEvaluationResult() { } + public string Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRecognitionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRecognitionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRecognitionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentEntityRegionEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentEntityRegionEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedEntities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedEntities { get { throw null; } } + public int RegionLength { get { throw null; } } + public int RegionOffset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEntityRegionEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DocumentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DocumentEvaluationResult(string location, string language) { } + public string Language { get { throw null; } } + public string Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentHealthcareEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentHealthcareEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentHealthcareEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentMultiLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentMultiLabelClassificationEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedClasses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedClasses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentMultiLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSentimentLabelEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSentimentLabelEvaluationResult() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Category { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSentimentLabelEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentSingleLabelClassificationEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentSingleLabelClassificationEvaluationResult() { } + public string ExpectedClass { get { throw null; } } + public string PredictedClass { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentSingleLabelClassificationEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentTextSentimentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DocumentTextSentimentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyList ExpectedSentimentSpans { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PredictedSentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.DocumentTextSentimentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntityRecognitionEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityRecognitionEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Entities { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EntityRecognitionEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexLimitReached { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchIndexNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Conflict { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Forbidden { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InternalServerError { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidArgument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode NotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode OperationNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ProjectNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode QuotaExceeded { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode ServiceUnavailable { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Timeout { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode TooManyRequests { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Unauthorized { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ErrorCode Warning { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ErrorCode 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.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ErrorCode left, Azure.AI.Language.Text.Authoring.Models.ErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EvaluationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationDetails() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationKind? Kind { get { throw null; } set { } } + public int? TestingSplitPercentage { get { throw null; } set { } } + public int? TrainingSplitPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobResult() { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + public string ModelLabel { get { throw null; } } + public int PercentComplete { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluationJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluationJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EvaluationKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EvaluationKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Manual { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.EvaluationKind Percentage { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.EvaluationKind 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.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.EvaluationKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.EvaluationKind left, Azure.AI.Language.Text.Authoring.Models.EvaluationKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class EvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected EvaluationSummary(Azure.AI.Language.Text.Authoring.Models.EvaluationDetails evaluationOptions) { } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.EvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCompositeEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCompositeEntity() { } + public string Category { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CompositionSetting? CompositionSetting { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.ExportedEntityList List { get { throw null; } set { } } + public System.Collections.Generic.IList Prebuilts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCompositeEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string SummaryLocation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomAbstractiveSummarizationProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomAbstractiveSummarizationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomEntityRecognitionProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomEntityRecognitionProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomEntityRecognitionProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareDocument() { } + public string Dataset { get { throw null; } set { } } + public System.Collections.Generic.IList Entities { get { throw null; } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomHealthcareProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomHealthcareProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + public System.Collections.Generic.IList Entities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomHealthcareProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationDocument() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomMultiLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomMultiLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomMultiLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationDocument() { } + public Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass Class { get { throw null; } set { } } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomSingleLabelClassificationProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomSingleLabelClassificationProjectAssets() { } + public System.Collections.Generic.IList Classes { get { throw null; } } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomSingleLabelClassificationProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentDocument() { } + public string Dataset { get { throw null; } set { } } + public string Language { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IList SentimentSpans { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedCustomTextSentimentProjectAssets : Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedCustomTextSentimentProjectAssets() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedCustomTextSentimentProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentClass : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentClass() { } + public string Category { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentClass System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityLabel() { } + public string Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentEntityRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentEntityRegion() { } + public System.Collections.Generic.IList Labels { get { throw null; } } + public int? RegionLength { get { throw null; } set { } } + public int? RegionOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentEntityRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedDocumentSentimentLabel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedDocumentSentimentLabel() { } + public Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment? Category { get { throw null; } set { } } + public int? Length { get { throw null; } set { } } + public int? Offset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedDocumentSentimentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntity() { } + public string Category { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityList() { } + public System.Collections.Generic.IList Sublists { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntityListSynonym : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntityListSynonym() { } + public string Language { get { throw null; } set { } } + public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntityListSynonym System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedEntitySublist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedEntitySublist() { } + public string ListKey { get { throw null; } set { } } + public System.Collections.Generic.IList Synonyms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedEntitySublist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedModelDetails(string trainedModelLabel) { } + public string TrainedModelLabel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedModelManifest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedModelManifest() { } + public System.Collections.Generic.IReadOnlyList ModelFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedModelManifest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedPrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedPrebuiltEntity(string category) { } + public string Category { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedPrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedProject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExportedProject(string projectFileVersion, Azure.AI.Language.Text.Authoring.Models.StringIndexType stringIndexType, Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails metadata) { } + public Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets Assets { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.CreateProjectDetails Metadata { get { throw null; } } + public string ProjectFileVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.StringIndexType StringIndexType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class ExportedProjectAssets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExportedProjectAssets() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedProjectAssets System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportedTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportedTrainedModel() { } + public string ExportedModelName { get { throw null; } } + public System.DateTimeOffset LastExportedModelDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportedTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public string ResultUrl { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ExportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImportProjectJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ImportProjectJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ImportProjectJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InnerErrorCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InnerErrorCode(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode AzureCognitiveSearchThrottling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode EmptyRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ExtractionFailure { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidCountryHint { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocument { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidDocumentBatch { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidParameterValue { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequest { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode InvalidRequestBodyFormat { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode KnowledgeBaseNotFound { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode MissingInputDocuments { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode ModelVersionIncorrect { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.InnerErrorCode UnsupportedLanguageCode { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode 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.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.InnerErrorCode (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.InnerErrorCode left, Azure.AI.Language.Text.Authoring.Models.InnerErrorCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InnerErrorModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InnerErrorModel() { } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Cancelling { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Failed { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus PartiallyCompleted { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Running { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.JobStatus 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.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.JobStatus left, Azure.AI.Language.Text.Authoring.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LoadSnapshotJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LoadSnapshotJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.LoadSnapshotJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelFile() { } + public System.Uri ContentUri { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ModelFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MultiLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.MultiLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PrebuiltEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PrebuiltEntity() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Examples { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.PrebuiltEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeletionJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeletionJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeletionJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectDeployment() { } + public System.Collections.Generic.IReadOnlyList AssignedResources { get { throw null; } } + public System.DateTimeOffset DeploymentExpirationDate { get { throw null; } } + public string DeploymentName { get { throw null; } } + public System.DateTimeOffset LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProjectKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProjectKind(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomAbstractiveSummarization { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomEntityRecognition { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomHealthcare { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomMultiLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomSingleLabelClassification { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.ProjectKind CustomTextSentiment { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.ProjectKind 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.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.ProjectKind (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.ProjectKind left, Azure.AI.Language.Text.Authoring.Models.ProjectKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProjectMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectMetadata() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string Description { get { throw null; } } + public string Language { get { throw null; } } + public System.DateTimeOffset? LastDeployedDateTime { get { throw null; } } + public System.DateTimeOffset LastModifiedDateTime { get { throw null; } } + public System.DateTimeOffset? LastTrainedDateTime { get { throw null; } } + public bool? Multilingual { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectKind ProjectKind { get { throw null; } } + public string ProjectName { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ProjectSettings Settings { get { throw null; } } + public string StorageInputContainerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectSettings() { } + public string AmlProjectPath { get { throw null; } set { } } + public float? ConfidenceThreshold { get { throw null; } set { } } + public int? GptPredictiveLookahead { get { throw null; } set { } } + public bool? IsLabelingLocked { get { throw null; } set { } } + public bool? RunGptPredictions { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectTrainedModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectTrainedModel() { } + public bool HasSnapshot { get { throw null; } } + public string Label { get { throw null; } } + public System.DateTimeOffset LastTrainedDateTime { get { throw null; } } + public int LastTrainingDurationInSeconds { get { throw null; } } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string ModelId { get { throw null; } } + public string ModelTrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ProjectTrainedModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceMetadata(string azureResourceId, string customDomain, string region) { } + public string AzureResourceId { get { throw null; } } + public string CustomDomain { get { throw null; } } + public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.ResourceMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SentimentEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassEvaluationSummary() { } + public double F1 { get { throw null; } } + public int FalseNegativeCount { get { throw null; } } + public int FalsePositiveCount { get { throw null; } } + public double Precision { get { throw null; } } + public double Recall { get { throw null; } } + public int TrueNegativeCount { get { throw null; } } + public int TruePositiveCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SingleLabelClassificationEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SingleLabelClassificationEvaluationSummary() { } + public System.Collections.Generic.IReadOnlyDictionary Classes { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SingleLabelClassificationEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SpanSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SpanSentimentEvaluationSummary() { } + public Azure.AI.Language.Text.Authoring.Models.ConfusionMatrix ConfusionMatrix { get { throw null; } } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Sentiments { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { 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.Language.Text.Authoring.Models.StringIndexType Utf16CodeUnit { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.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.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.StringIndexType (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.StringIndexType left, Azure.AI.Language.Text.Authoring.Models.StringIndexType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SubTrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SubTrainingJobState() { } + public System.DateTimeOffset? EndDateTime { get { throw null; } } + public int PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SupportedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SupportedLanguage() { } + public string LanguageCode { get { throw null; } } + public string LanguageName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SupportedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) { } + public string FirstDeploymentName { get { throw null; } } + public string SecondDeploymentName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SwapDeploymentsJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SwapDeploymentsJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.SwapDeploymentsJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextAnalysisAuthoringError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringError() { } + public Azure.AI.Language.Text.Authoring.Models.ErrorCode Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.InnerErrorModel Innererror { get { throw null; } } + public string Message { get { throw null; } } + public string Target { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TextAnalysisAuthoringSentiment : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextAnalysisAuthoringSentiment(string value) { throw null; } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Negative { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Neutral { get { throw null; } } + public static Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment Positive { get { throw null; } } + public bool Equals(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment 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.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public static implicit operator Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment (string value) { throw null; } + public static bool operator !=(Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment left, Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringSentiment right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TextAnalysisAuthoringWarning : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextAnalysisAuthoringWarning() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextAnalysisAuthoringWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TextSentimentEvaluationSummary : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextSentimentEvaluationSummary() { } + public float MacroF1 { get { throw null; } } + public float MacroPrecision { get { throw null; } } + public float MacroRecall { get { throw null; } } + public float MicroF1 { get { throw null; } } + public float MicroPrecision { get { throw null; } } + public float MicroRecall { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TextSentimentEvaluationSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingConfigVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingConfigVersion() { } + public System.DateTimeOffset ModelExpirationDate { get { throw null; } } + public string TrainingConfigVersionProperty { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingConfigVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) { } + public Azure.AI.Language.Text.Authoring.Models.DataGenerationSettings DataGenerationSettings { get { throw null; } set { } } + public Azure.AI.Language.Text.Authoring.Models.EvaluationDetails EvaluationOptions { get { throw null; } set { } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobResult() { } + public System.DateTimeOffset? EstimatedEndDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState EvaluationStatus { get { throw null; } } + public string ModelLabel { get { throw null; } } + public string TrainingConfigVersion { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.SubTrainingJobState TrainingStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrainingJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TrainingJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.TrainingJobResult Result { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.TrainingJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UnassignDeploymentResourcesDetails(System.Collections.Generic.IEnumerable assignedResourceIds) { } + public System.Collections.Generic.IList AssignedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UnassignDeploymentResourcesJobState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UnassignDeploymentResourcesJobState() { } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public System.DateTimeOffset? ExpirationDateTime { get { throw null; } } + public string JobId { get { throw null; } } + public System.DateTimeOffset LastUpdatedDateTime { get { throw null; } } + public Azure.AI.Language.Text.Authoring.Models.JobStatus Status { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.Authoring.Models.UnassignDeploymentResourcesJobState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj new file mode 100644 index 000000000000..ae49f23f6115 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Azure.AI.Language.Text.Authoring.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.AI.Language.Text.Authoring client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Language.Text.Authoring for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Language.Text.Authoring + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs new file mode 100644 index 000000000000..5068ba1246ed --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringClientBuilderExtensions.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.Language.Text.Authoring; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AILanguageTextAuthoringClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new AuthoringClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthoringClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthoringClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs new file mode 100644 index 000000000000..23858bab8267 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AILanguageTextAuthoringModelFactory.cs @@ -0,0 +1,1141 @@ +// 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.Language.Text.Authoring.Models +{ + /// Model factory for models. + public static partial class AILanguageTextAuthoringModelFactory + { + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// Represents the project last training datetime. + /// Represents the project last deployment datetime. + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static ProjectMetadata ProjectMetadata(DateTimeOffset createdDateTime = default, DateTimeOffset lastModifiedDateTime = default, DateTimeOffset? lastTrainedDateTime = null, DateTimeOffset? lastDeployedDateTime = null, ProjectKind projectKind = default, string storageInputContainerName = null, ProjectSettings settings = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// 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 TextAnalysisAuthoringError TextAnalysisAuthoringError(ErrorCode code = default, string message = null, string target = null, IEnumerable details = null, InnerErrorModel innererror = null) + { + details ??= new List(); + + return new TextAnalysisAuthoringError( + code, + message, + target, + details?.ToList(), + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// A new instance for mocking. + public static InnerErrorModel InnerErrorModel(InnerErrorCode code = default, string message = null, IReadOnlyDictionary details = null, string target = null, InnerErrorModel innererror = null) + { + details ??= new Dictionary(); + + return new InnerErrorModel( + code, + message, + details, + target, + innererror, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static CreateProjectDetails CreateProjectDetails(ProjectKind projectKind = default, string storageInputContainerName = null, ProjectSettings settings = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) + { + return new CreateProjectDetails( + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 . + /// + /// A new instance for mocking. + public static ExportedProject ExportedProject(string projectFileVersion = null, StringIndexType stringIndexType = default, CreateProjectDetails metadata = null, ExportedProjectAssets assets = null) + { + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// A new instance for mocking. + public static ExportedCustomAbstractiveSummarizationDocument ExportedCustomAbstractiveSummarizationDocument(string summaryLocation = null, string location = null, string language = null, string dataset = null) + { + return new ExportedCustomAbstractiveSummarizationDocument(summaryLocation, location, language, dataset, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Represents the settings for using data generation as part of training a custom model. + /// A new instance for mocking. + public static TrainingJobDetails TrainingJobDetails(string modelLabel = null, string trainingConfigVersion = null, EvaluationDetails evaluationOptions = null, DataGenerationSettings dataGenerationSettings = null) + { + return new TrainingJobDetails(modelLabel, trainingConfigVersion, evaluationOptions, dataGenerationSettings, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Connection type for data generation settings. Currently only supports Azure Open AI. + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// A new instance for mocking. + public static DataGenerationConnectionInfo DataGenerationConnectionInfo(DataGenerationConnectionInfoKind kind = default, string resourceId = null, string deploymentName = null) + { + return new DataGenerationConnectionInfo(kind, resourceId, deploymentName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// Represents model evaluation status. + /// Represents the estimate end date time for training and evaluation. + /// A new instance for mocking. + public static TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, SubTrainingJobState trainingStatus = null, SubTrainingJobState evaluationStatus = null, DateTimeOffset? estimatedEndDateTime = null) + { + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// A new instance for mocking. + public static SubTrainingJobState SubTrainingJobState(int percentComplete = default, DateTimeOffset? startDateTime = null, DateTimeOffset? endDateTime = null, JobStatus status = default) + { + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// A new instance for mocking. + public static TrainingJobState TrainingJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, TrainingJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// A new instance for mocking. + public static TextAnalysisAuthoringWarning TextAnalysisAuthoringWarning(string code = null, string message = null) + { + return new TextAnalysisAuthoringWarning(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static CopyProjectJobState CopyProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// A new instance for mocking. + public static ProjectDeployment ProjectDeployment(string deploymentName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default, string modelTrainingConfigVersion = null, IEnumerable assignedResources = null) + { + assignedResources ??= new List(); + + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// A new instance for mocking. + public static DeploymentResource DeploymentResource(string resourceId = null, string region = null) + { + return new DeploymentResource(resourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// A new instance for mocking. + public static CreateDeploymentDetails CreateDeploymentDetails(string trainedModelLabel = null, IEnumerable assignedResourceIds = null) + { + assignedResourceIds ??= new List(); + + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentDeleteFromResourcesJobState DeploymentDeleteFromResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static DeploymentJobState DeploymentJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static SwapDeploymentsJobState SwapDeploymentsJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// A new instance for mocking. + public static ExportProjectJobState ExportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, string resultUrl = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + resultUrl, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// A new instance for mocking. + public static ExportedTrainedModel ExportedTrainedModel(string exportedModelName = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, DateTimeOffset lastExportedModelDateTime = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null) + { + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ExportedModelJobState ExportedModelJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// A new instance for mocking. + public static ExportedModelManifest ExportedModelManifest(IEnumerable modelFiles = null) + { + modelFiles ??= new List(); + + return new ExportedModelManifest(modelFiles?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// A new instance for mocking. + public static ModelFile ModelFile(string name = null, Uri contentUri = null) + { + return new ModelFile(name, contentUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ImportProjectJobState ImportProjectJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// A new instance for mocking. + public static ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, DateTimeOffset lastTrainedDateTime = default, int lastTrainingDurationInSeconds = default, DateTimeOffset modelExpirationDate = default, string modelTrainingConfigVersion = null, bool hasSnapshot = default) + { + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// A new instance for mocking. + public static EvaluationJobResult EvaluationJobResult(EvaluationDetails evaluationOptions = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = default) + { + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// A new instance for mocking. + public static EvaluationJobState EvaluationJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, EvaluationJobResult result = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static DocumentEvaluationResult DocumentEvaluationResult(string projectKind = null, string location = null, string language = null) + { + return new UnknownDocumentEvaluationResult(projectKind == null ? default : new ProjectKind(projectKind), location, language, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// A new instance for mocking. + public static CustomEntityRecognitionDocumentEvaluationResult CustomEntityRecognitionDocumentEvaluationResult(string location = null, string language = null, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = null) + { + return new CustomEntityRecognitionDocumentEvaluationResult(ProjectKind.CustomEntityRecognition, location, language, serializedAdditionalRawData: null, customEntityRecognitionResult); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// A new instance for mocking. + public static DocumentEntityRecognitionEvaluationResult DocumentEntityRecognitionEvaluationResult(IEnumerable entities = null) + { + entities ??= new List(); + + return new DocumentEntityRecognitionEvaluationResult(entities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// A new instance for mocking. + public static DocumentEntityRegionEvaluationResult DocumentEntityRegionEvaluationResult(IEnumerable expectedEntities = null, IEnumerable predictedEntities = null, int regionOffset = default, int regionLength = default) + { + expectedEntities ??= new List(); + predictedEntities ??= new List(); + + return new DocumentEntityRegionEvaluationResult(expectedEntities?.ToList(), predictedEntities?.ToList(), regionOffset, regionLength, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// A new instance for mocking. + public static DocumentEntityLabelEvaluationResult DocumentEntityLabelEvaluationResult(string category = null, int offset = default, int length = default) + { + return new DocumentEntityLabelEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// A new instance for mocking. + public static CustomHealthcareDocumentEvaluationResult CustomHealthcareDocumentEvaluationResult(string location = null, string language = null, DocumentHealthcareEvaluationResult customHealthcareResult = null) + { + return new CustomHealthcareDocumentEvaluationResult(ProjectKind.CustomHealthcare, location, language, serializedAdditionalRawData: null, customHealthcareResult); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// A new instance for mocking. + public static DocumentHealthcareEvaluationResult DocumentHealthcareEvaluationResult(IEnumerable entities = null) + { + entities ??= new List(); + + return new DocumentHealthcareEvaluationResult(entities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for multi label classification. + /// A new instance for mocking. + public static CustomMultiLabelClassificationDocumentEvaluationResult CustomMultiLabelClassificationDocumentEvaluationResult(string location = null, string language = null, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = null) + { + return new CustomMultiLabelClassificationDocumentEvaluationResult(ProjectKind.CustomMultiLabelClassification, location, language, serializedAdditionalRawData: null, customMultiLabelClassificationResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// A new instance for mocking. + public static DocumentMultiLabelClassificationEvaluationResult DocumentMultiLabelClassificationEvaluationResult(IEnumerable expectedClasses = null, IEnumerable predictedClasses = null) + { + expectedClasses ??= new List(); + predictedClasses ??= new List(); + + return new DocumentMultiLabelClassificationEvaluationResult(expectedClasses?.ToList(), predictedClasses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for single label classification. + /// A new instance for mocking. + public static CustomSingleLabelClassificationDocumentEvaluationResult CustomSingleLabelClassificationDocumentEvaluationResult(string location = null, string language = null, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = null) + { + return new CustomSingleLabelClassificationDocumentEvaluationResult(ProjectKind.CustomSingleLabelClassification, location, language, serializedAdditionalRawData: null, customSingleLabelClassificationResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// A new instance for mocking. + public static DocumentSingleLabelClassificationEvaluationResult DocumentSingleLabelClassificationEvaluationResult(string expectedClass = null, string predictedClass = null) + { + return new DocumentSingleLabelClassificationEvaluationResult(expectedClass, predictedClass, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for text sentiment. + /// A new instance for mocking. + public static CustomTextSentimentDocumentEvaluationResult CustomTextSentimentDocumentEvaluationResult(string location = null, string language = null, DocumentTextSentimentEvaluationResult customTextSentimentResult = null) + { + return new CustomTextSentimentDocumentEvaluationResult(ProjectKind.CustomTextSentiment, location, language, serializedAdditionalRawData: null, customTextSentimentResult); + } + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// A new instance for mocking. + public static DocumentTextSentimentEvaluationResult DocumentTextSentimentEvaluationResult(IEnumerable expectedSentimentSpans = null, IEnumerable predictedSentimentSpans = null) + { + expectedSentimentSpans ??= new List(); + predictedSentimentSpans ??= new List(); + + return new DocumentTextSentimentEvaluationResult(expectedSentimentSpans?.ToList(), predictedSentimentSpans?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + /// A new instance for mocking. + public static DocumentSentimentLabelEvaluationResult DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category = default, int offset = default, int length = default) + { + return new DocumentSentimentLabelEvaluationResult(category, offset, length, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// A new instance for mocking. + public static EvaluationSummary EvaluationSummary(string projectKind = null, EvaluationDetails evaluationOptions = null) + { + return new UnknownEvaluationSummary(projectKind == null ? default : new ProjectKind(projectKind), evaluationOptions, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to extraction evaluation. + /// A new instance for mocking. + public static CustomEntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluationSummary(EvaluationDetails evaluationOptions = null, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = null) + { + return new CustomEntityRecognitionEvaluationSummary(ProjectKind.CustomEntityRecognition, evaluationOptions, serializedAdditionalRawData: null, customEntityRecognitionEvaluation); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static EntityRecognitionEvaluationSummary EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary entities = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + entities ??= new Dictionary(); + + return new EntityRecognitionEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrix ConfusionMatrix(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrix(additionalProperties); + } + + /// Initializes a new instance of . + /// Additional Properties. + /// A new instance for mocking. + public static ConfusionMatrixRow ConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new ConfusionMatrixRow(additionalProperties); + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// A new instance for mocking. + public static ConfusionMatrixCell ConfusionMatrixCell(float normalizedValue = default, float rawValue = default) + { + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static EntityEvaluationSummary EntityEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to health care evaluation. + /// A new instance for mocking. + public static CustomHealthcareEvaluationSummary CustomHealthcareEvaluationSummary(EvaluationDetails evaluationOptions = null, EntityRecognitionEvaluationSummary customHealthcareEvaluation = null) + { + return new CustomHealthcareEvaluationSummary(ProjectKind.CustomHealthcare, evaluationOptions, serializedAdditionalRawData: null, customHealthcareEvaluation); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to multi label classification evaluation. + /// A new instance for mocking. + public static CustomMultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions = null, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = null) + { + return new CustomMultiLabelClassificationEvaluationSummary(ProjectKind.CustomMultiLabelClassification, evaluationOptions, serializedAdditionalRawData: null, customMultiLabelClassificationEvaluation); + } + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static MultiLabelClassificationEvaluationSummary MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + classes ??= new Dictionary(); + + return new MultiLabelClassificationEvaluationSummary( + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static MultiLabelClassEvaluationSummary MultiLabelClassEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new MultiLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to single label classification evaluation. + /// A new instance for mocking. + public static CustomSingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions = null, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = null) + { + return new CustomSingleLabelClassificationEvaluationSummary(ProjectKind.CustomSingleLabelClassification, evaluationOptions, serializedAdditionalRawData: null, customSingleLabelClassificationEvaluation); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static SingleLabelClassificationEvaluationSummary SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary classes = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + classes ??= new Dictionary(); + + return new SingleLabelClassificationEvaluationSummary( + confusionMatrix, + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static SingleLabelClassEvaluationSummary SingleLabelClassEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new SingleLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to custom sentiment evaluation. + /// A new instance for mocking. + public static CustomTextSentimentEvaluationSummary CustomTextSentimentEvaluationSummary(EvaluationDetails evaluationOptions = null, TextSentimentEvaluationSummary customTextSentimentEvaluation = null) + { + return new CustomTextSentimentEvaluationSummary(ProjectKind.CustomTextSentiment, evaluationOptions, serializedAdditionalRawData: null, customTextSentimentEvaluation); + } + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static TextSentimentEvaluationSummary TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + return new TextSentimentEvaluationSummary( + spanSentimentsEvaluation, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// A new instance for mocking. + public static SpanSentimentEvaluationSummary SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix = null, IReadOnlyDictionary sentiments = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) + { + sentiments ??= new Dictionary(); + + return new SpanSentimentEvaluationSummary( + confusionMatrix, + sentiments, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// A new instance for mocking. + public static SentimentEvaluationSummary SentimentEvaluationSummary(double f1 = default, double precision = default, double recall = default, int truePositiveCount = default, int trueNegativeCount = default, int falsePositiveCount = default, int falseNegativeCount = default) + { + return new SentimentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static LoadSnapshotJobState LoadSnapshotJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// A new instance for mocking. + public static AssignedDeploymentResource AssignedDeploymentResource(string azureResourceId = null, string region = null) + { + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static AssignDeploymentResourcesJobState AssignDeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new AssignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static UnassignDeploymentResourcesJobState UnassignDeploymentResourcesJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new UnassignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// A new instance for mocking. + public static ProjectDeletionJobState ProjectDeletionJobState(string jobId = null, DateTimeOffset createdDateTime = default, DateTimeOffset lastUpdatedDateTime = default, DateTimeOffset? expirationDateTime = null, JobStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings?.ToList(), + errors?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// A new instance for mocking. + public static AssignedProjectDeploymentsMetadata AssignedProjectDeploymentsMetadata(string projectName = null, IEnumerable deploymentsMetadata = null) + { + deploymentsMetadata ??= new List(); + + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// A new instance for mocking. + public static AssignedProjectDeploymentMetadata AssignedProjectDeploymentMetadata(string deploymentName = null, DateTimeOffset lastDeployedDateTime = default, DateTimeOffset deploymentExpirationDate = default) + { + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// A new instance for mocking. + public static SupportedLanguage SupportedLanguage(string languageName = null, string languageCode = null) + { + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// A new instance for mocking. + public static PrebuiltEntity PrebuiltEntity(string category = null, string description = null, string examples = null) + { + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// A new instance for mocking. + public static TrainingConfigVersion TrainingConfigVersion(string trainingConfigVersionProperty = null, DateTimeOffset modelExpirationDate = default) + { + return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs new file mode 100644 index 000000000000..c9d187a629d9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClient.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Text.Authoring +{ + // Data plane generated client. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. + public partial class AuthoringClient + { + 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; + + /// 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 AuthoringClient for mocking. + protected AuthoringClient() + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthoringClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthoringClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthoringClientOptions()) + { + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthoringClient(Uri endpoint, AzureKeyCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AuthoringClient. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthoringClient(Uri endpoint, TokenCredential credential, AuthoringClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthoringClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of TextAnalysisAuthoring. + /// The API version to use for this operation. + /// is null. + public virtual TextAnalysisAuthoring GetTextAnalysisAuthoringClient(string apiVersion = "2024-11-15-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new TextAnalysisAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.cs new file mode 100644 index 000000000000..4c7c68bce1dd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/AuthoringClientOptions.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.Language.Text.Authoring +{ + /// Client options for AuthoringClient. + public partial class AuthoringClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-04-01". + V2023_04_01 = 1, + /// Service version "2023-04-15-preview". + V2023_04_15_Preview = 2, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 3, + } + + internal string Version { get; } + + /// Initializes new instance of AuthoringClientOptions. + public AuthoringClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_04_01 => "2023-04-01", + ServiceVersion.V2023_04_15_Preview => "2023-04-15-preview", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml new file mode 100644 index 000000000000..9d6677f775eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Docs/TextAnalysisAuthoring.xml @@ -0,0 +1,5789 @@ + + + + + +This sample shows how to call GetProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> +This sample shows how to call GetProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync(""); +]]> + + + +This sample shows how to call GetProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> +This sample shows how to call GetProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject(""); +]]> + + + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProjectAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call GetProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call GetProject with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProject("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProjectAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = await client.CreateProjectAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CreateProject and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> +This sample shows how to call CreateProject with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", +}); +Response response = client.CreateProject("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); +Console.WriteLine(result.GetProperty("projectName").ToString()); +Console.WriteLine(result.GetProperty("multilingual").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("language").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorization. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call CopyProjectAuthorizationAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorizationAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = await client.CopyProjectAuthorizationAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call CopyProjectAuthorization and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> +This sample shows how to call CopyProjectAuthorization with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = client.CopyProjectAuthorization("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("targetProjectName").ToString()); +Console.WriteLine(result.GetProperty("accessToken").ToString()); +Console.WriteLine(result.GetProperty("expiresAt").ToString()); +Console.WriteLine(result.GetProperty("targetResourceId").ToString()); +Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetCopyProjectStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetCopyProjectStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> +This sample shows how to call GetDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", ""); +]]> + + + +This sample shows how to call GetDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> +This sample shows how to call GetDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", ""); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeploymentAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeployment and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> +This sample shows how to call GetDeployment with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeployment("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("deploymentName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); +Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetDeploymentStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetDeploymentStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetDeploymentStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetSwapDeploymentsStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> +This sample shows how to call GetExportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetExportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> +This sample shows how to call GetExportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", ""); +]]> + + + +This sample shows how to call GetExportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> +This sample shows how to call GetExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> +This sample shows how to call GetExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", ""); +]]> + + + +This sample shows how to call GetExportedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> +This sample shows how to call GetExportedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("exportedModelName").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelJobStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetExportedModelManifestAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", ""); +]]> +This sample shows how to call GetExportedModelManifestAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModelManifest. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", ""); +]]> +This sample shows how to call GetExportedModelManifest with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", ""); +]]> + + + +This sample shows how to call GetExportedModelManifestAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> +This sample shows how to call GetExportedModelManifestAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetExportedModelManifestAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> + + + +This sample shows how to call GetExportedModelManifest and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> +This sample shows how to call GetExportedModelManifest with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetExportedModelManifest("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); +]]> + + + +This sample shows how to call GetImportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> +This sample shows how to call GetImportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetImportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> +This sample shows how to call GetImportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", ""); +]]> + + + +This sample shows how to call GetImportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetImportStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetImportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetImportStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetImportStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> + + + +This sample shows how to call GetTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> +This sample shows how to call GetTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", ""); +]]> + + + +This sample shows how to call GetTrainedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainedModelAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call GetTrainedModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> +This sample shows how to call GetTrainedModel with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainedModel("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("modelId").ToString()); +Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); +Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +]]> + + + +This sample shows how to call DeleteTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> +This sample shows how to call GetEvaluationStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetEvaluationStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetEvaluationStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call GetEvaluationStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetEvaluationStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummary. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationSummary and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("projectKind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetLoadSnapshotStatus("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> +This sample shows how to call GetTrainingStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", ""); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetTrainingStatusAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call GetTrainingStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetTrainingStatus("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = await client.GetProjectDeletionStatusAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Response response = client.GetProjectDeletionStatus("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("createdDateTime").ToString()); +Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); +Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); +]]> + + + +This sample shows how to call GetProjectsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync()) +{ +} +]]> +This sample shows how to call GetProjectsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjects. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects()) +{ +} +]]> +This sample shows how to call GetProjects with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjectsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjectsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetProjects and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetProjects with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("")) +{ +} +]]> +This sample shows how to call GetDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("")) +{ +} +]]> +This sample shows how to call GetExportedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetExportedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> +This sample shows how to call GetExportedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("")) +{ +} +]]> +This sample shows how to call GetTrainedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModelsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetTrainedModels and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> +This sample shows how to call GetTrainedModels with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResults. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetModelEvaluationResults and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) +{ +} +]]> +This sample shows how to call GetDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResourcesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetDeploymentResources and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> +This sample shows how to call GetDeploymentResources with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobs. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("")) +{ +} +]]> +This sample shows how to call GetTrainingJobs with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingJobs and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); +} +]]> +This sample shows how to call GetTrainingJobs with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); +} +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetAssignedResourceDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetAssignedResourceDeploymentsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetAssignedResourceDeployments and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetAssignedResourceDeployments(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetAssignedResourceDeployments(1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguages. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (SupportedLanguage item in client.GetSupportedLanguages()) +{ +} +]]> +This sample shows how to call GetSupportedLanguages with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (SupportedLanguage item in client.GetSupportedLanguages(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedLanguages and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedLanguages(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> +This sample shows how to call GetSupportedLanguages with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedLanguages("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync()) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersions. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions()) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call GetTrainingConfigVersions and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingConfigVersions(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +foreach (BinaryData item in client.GetTrainingConfigVersions("CustomSingleLabelClassification", 1234, 1234, 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); +} +]]> + + + +This sample shows how to call DeleteProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call DeleteProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> +This sample shows how to call CopyProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CopyProjectDetails body = new CopyProjectDetails( +ProjectKind.CustomSingleLabelClassification, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> +This sample shows how to call CopyProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", +}); +Operation operation = client.CopyProject(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call ImportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") +{ + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", +}) +{ + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") + { + Location = "", + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, format: ""); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); +Operation operation = client.Import(WaitUntil.Completed, "", body); +]]> +This sample shows how to call Import with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") +{ + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", +}) +{ + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") + { + Location = "", + Language = "", + Dataset = "", + }}, + }, +}; +Operation operation = client.Import(WaitUntil.Completed, "", body, format: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call ImportAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { + new + { + summaryLocation = "", + location = "", + language = "", + dataset = "", + } + }, + projectKind = "CustomAbstractiveSummarization", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: ""); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content); +]]> +This sample shows how to call Import with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { + new + { + summaryLocation = "", + location = "", + language = "", + dataset = "", + } + }, + projectKind = "CustomAbstractiveSummarization", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, format: ""); +]]> + + + +This sample shows how to call TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", ""); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call TrainAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", "") +{ + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), +}; +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", ""); +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call Train with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +TrainingJobDetails body = new TrainingJobDetails("", "") +{ + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), +}; +Operation operation = client.Train(WaitUntil.Completed, "", body); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call TrainAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call TrainAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, +}); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call Train and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call Train with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, +}); +Operation operation = client.Train(WaitUntil.Completed, "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails(""); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeployProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +CreateDeploymentDetails body = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProjectAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeployProject with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails(); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +DeleteDeploymentDetails body = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> +This sample shows how to call SwapDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> +This sample shows how to call SwapDeployments with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + firstDeploymentName = "", + secondDeploymentName = "", +}); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +ExportedModelDetails body = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + trainedModelLabel = "", +}); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call DeleteExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call EvaluateModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails(); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +EvaluationDetails body = new EvaluationDetails +{ + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModelAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call EvaluateModel and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new object()); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> +This sample shows how to call EvaluateModel with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, +}); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("percentComplete").ToString()); +]]> + + + +This sample shows how to call LoadSnapshotAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call LoadSnapshot. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call AssignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call AssignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + resourcesMetadata = new object[] + { + new + { + azureResourceId = "", + customDomain = "", + region = "", + } + }, +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters and request content. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + +This sample shows how to call CancelTrainingJobAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJob. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJob with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJobAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJobAsync with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + +This sample shows how to call CancelTrainingJob and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +]]> +This sample shows how to call CancelTrainingJob with all parameters and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); +BinaryData responseData = operation.Value; + +JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; +Console.WriteLine(result.GetProperty("modelLabel").ToString()); +Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); +Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Argument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..3fa25d1d24da --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..74e36eab8e74 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..403fa2389393 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Language.Text.Authoring +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..3c5697bcb4b4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Optional.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..017fd861b854 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Language.Text.Authoring +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..9575d889e32b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..70b3163cb78c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourcesMetadata"u8); + writer.WriteStartArray(); + foreach (var item in ResourcesMetadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static AssignDeploymentResourcesDetails DeserializeAssignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resourcesMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourcesMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceMetadata.DeserializeResourceMetadata(item, options)); + } + resourcesMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesDetails(resourcesMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..2bbfb5188cb7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the options for assigning Azure resources to a project. + public partial class AssignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// is null. + public AssignDeploymentResourcesDetails(IEnumerable resourcesMetadata) + { + Argument.AssertNotNull(resourcesMetadata, nameof(resourcesMetadata)); + + ResourcesMetadata = resourcesMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the metadata for the resources to be assigned. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesDetails(IList resourcesMetadata, IDictionary serializedAdditionalRawData) + { + ResourcesMetadata = resourcesMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesDetails() + { + } + + /// Represents the metadata for the resources to be assigned. + public IList ResourcesMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..bda18efe99e8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignDeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignDeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignDeploymentResourcesJobState(document.RootElement, options); + } + + internal static AssignDeploymentResourcesJobState DeserializeAssignDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + AssignDeploymentResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignDeploymentResourcesJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignDeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignDeploymentResourcesJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.cs new file mode 100644 index 000000000000..7661a3cd0353 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignDeploymentResourcesJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a assign deployment resources job. + public partial class AssignDeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal AssignDeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal AssignDeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignDeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs new file mode 100644 index 000000000000..9bfeba044263 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignedDeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedDeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + + internal static AssignedDeploymentResource DeserializeAssignedDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + AssignedDeploymentResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedDeploymentResource)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedDeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedDeploymentResource(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.cs new file mode 100644 index 000000000000..3981d1d5e0f4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedDeploymentResource.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the assigned deployment resource. + public partial class AssignedDeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource region. + /// is null. + internal AssignedDeploymentResource(string region) + { + Argument.AssertNotNull(region, nameof(region)); + + Region = region; + } + + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedDeploymentResource(string azureResourceId, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedDeploymentResource() + { + } + + /// The resource ID. + public string AzureResourceId { get; } + /// The resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs new file mode 100644 index 000000000000..d30582549888 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignedProjectDeploymentMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedProjectDeploymentMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentMetadata DeserializeAssignedProjectDeploymentMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedProjectDeploymentMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.cs new file mode 100644 index 000000000000..8b5d9c8fe883 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentMetadata.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata for an assigned deployment. + public partial class AssignedProjectDeploymentMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// is null. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate) + { + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the deployment name. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentMetadata() + { + } + + /// Represents the deployment name. + public string DeploymentName { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs new file mode 100644 index 000000000000..fa117bf2c3ec --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class AssignedProjectDeploymentsMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + } + writer.WritePropertyName("deploymentsMetadata"u8); + writer.WriteStartArray(); + foreach (var item in DeploymentsMetadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AssignedProjectDeploymentsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + + internal static AssignedProjectDeploymentsMetadata DeserializeAssignedProjectDeploymentsMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectName = default; + IReadOnlyList deploymentsMetadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentsMetadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AssignedProjectDeploymentMetadata.DeserializeAssignedProjectDeploymentMetadata(item, options)); + } + deploymentsMetadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{options.Format}' format."); + } + } + + AssignedProjectDeploymentsMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AssignedProjectDeploymentsMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAssignedProjectDeploymentsMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.cs new file mode 100644 index 000000000000..f7ddb77f5cdb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/AssignedProjectDeploymentsMetadata.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 System.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata for assigned deployments for a project. + public partial class AssignedProjectDeploymentsMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the resource region. + /// is null. + internal AssignedProjectDeploymentsMetadata(IEnumerable deploymentsMetadata) + { + Argument.AssertNotNull(deploymentsMetadata, nameof(deploymentsMetadata)); + + DeploymentsMetadata = deploymentsMetadata.ToList(); + } + + /// Initializes a new instance of . + /// Represents the project name. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal AssignedProjectDeploymentsMetadata(string projectName, IReadOnlyList deploymentsMetadata, IDictionary serializedAdditionalRawData) + { + ProjectName = projectName; + DeploymentsMetadata = deploymentsMetadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssignedProjectDeploymentsMetadata() + { + } + + /// Represents the project name. + public string ProjectName { get; } + /// Represents the resource region. + public IReadOnlyList DeploymentsMetadata { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.cs new file mode 100644 index 000000000000..2ee1a6c15cce --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CompositionSetting.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.Language.Text.Authoring.Models +{ + /// The CompositionSetting. + public readonly partial struct CompositionSetting : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CompositionSetting(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SeparateComponentsValue = "separateComponents"; + private const string CombineComponentsValue = "combineComponents"; + + /// Every component's match or prediction is returned as a separate instance of the entity. + public static CompositionSetting SeparateComponents { get; } = new CompositionSetting(SeparateComponentsValue); + /// When two or more components are found in the text and overlap, the components' spans are merged together into one span combining all of them. + public static CompositionSetting CombineComponents { get; } = new CompositionSetting(CombineComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(CompositionSetting left, CompositionSetting right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CompositionSetting left, CompositionSetting right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CompositionSetting(string value) => new CompositionSetting(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CompositionSetting other && Equals(other); + /// + public bool Equals(CompositionSetting other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs new file mode 100644 index 000000000000..130f76344bd0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ConfusionMatrix : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + ConfusionMatrix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrix(document.RootElement, options); + } + + internal static ConfusionMatrix DeserializeConfusionMatrix(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrix(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrix IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrix(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrix)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrix FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrix(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.cs new file mode 100644 index 000000000000..004bbed08c3c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrix.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The ConfusionMatrix. + public partial class ConfusionMatrix + { + /// Initializes a new instance of . + internal ConfusionMatrix() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrix(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs new file mode 100644 index 000000000000..8b4459453a7b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("normalizedValue"u8); + writer.WriteNumberValue(NormalizedValue); + writer.WritePropertyName("rawValue"u8); + writer.WriteNumberValue(RawValue); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + + internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float normalizedValue = default; + float rawValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("normalizedValue"u8)) + { + normalizedValue = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("rawValue"u8)) + { + rawValue = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixCell IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrixCell(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrixCell FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixCell(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.cs new file mode 100644 index 000000000000..b75dec32f7eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixCell.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a cell in a confusion matrix. + public partial class ConfusionMatrixCell + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + internal ConfusionMatrixCell(float normalizedValue, float rawValue) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + } + + /// Initializes a new instance of . + /// Represents normalized value in percentages. + /// Represents raw value. + /// Keeps track of any properties unknown to the library. + internal ConfusionMatrixCell(float normalizedValue, float rawValue, IDictionary serializedAdditionalRawData) + { + NormalizedValue = normalizedValue; + RawValue = rawValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ConfusionMatrixCell() + { + } + + /// Represents normalized value in percentages. + public float NormalizedValue { get; } + /// Represents raw value. + public float RawValue { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs new file mode 100644 index 000000000000..eb422157be56 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{format}' format."); + } + + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + ConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + + internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new ConfusionMatrixRow(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support writing '{options.Format}' format."); + } + } + + ConfusionMatrixRow IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConfusionMatrixRow(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ConfusionMatrixRow FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeConfusionMatrixRow(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.cs new file mode 100644 index 000000000000..248f7077a849 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ConfusionMatrixRow.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The ConfusionMatrixRow. + public partial class ConfusionMatrixRow + { + /// Initializes a new instance of . + internal ConfusionMatrixRow() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ConfusionMatrixRow(IReadOnlyDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// + /// Supported types: + /// + /// + /// + /// + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs new file mode 100644 index 000000000000..f258f2a8eedf --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + internal partial class CopyProjectAuthorizationRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(StorageInputContainerName)) + { + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + } + if (Optional.IsDefined(AllowOverwrite)) + { + writer.WritePropertyName("allowOverwrite"u8); + writer.WriteBooleanValue(AllowOverwrite.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectAuthorizationRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + + internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizationRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + bool? allowOverwrite = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowOverwrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowOverwrite = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectAuthorizationRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectAuthorizationRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectAuthorizationRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectAuthorizationRequest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.cs new file mode 100644 index 000000000000..5082f591b1ea --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectAuthorizationRequest.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The CopyProjectAuthorizationRequest. + internal partial class CopyProjectAuthorizationRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind) + { + ProjectKind = projectKind; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// Keeps track of any properties unknown to the library. + internal CopyProjectAuthorizationRequest(ProjectKind projectKind, string storageInputContainerName, bool? allowOverwrite, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + AllowOverwrite = allowOverwrite; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectAuthorizationRequest() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; } + /// The name of the storage container. + public string StorageInputContainerName { get; } + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + public bool? AllowOverwrite { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs new file mode 100644 index 000000000000..699a616472f5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CopyProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("targetProjectName"u8); + writer.WriteStringValue(TargetProjectName); + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + writer.WritePropertyName("expiresAt"u8); + writer.WriteStringValue(ExpiresAt, "O"); + writer.WritePropertyName("targetResourceId"u8); + writer.WriteStringValue(TargetResourceId); + writer.WritePropertyName("targetResourceRegion"u8); + writer.WriteStringValue(TargetResourceRegion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + + internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string targetProjectName = default; + string accessToken = default; + DateTimeOffset expiresAt = default; + string targetResourceId = default; + string targetResourceRegion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetProjectName"u8)) + { + targetProjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken"u8)) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresAt"u8)) + { + expiresAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("targetResourceId"u8)) + { + targetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceRegion"u8)) + { + targetResourceRegion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectDetails( + projectKind, + targetProjectName, + accessToken, + expiresAt, + targetResourceId, + targetResourceRegion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.cs new file mode 100644 index 000000000000..899d7879a650 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectDetails.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for copying an existing project to another Azure resource. + public partial class CopyProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// , , or is null. + public CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) + { + Argument.AssertNotNull(targetProjectName, nameof(targetProjectName)); + Argument.AssertNotNull(accessToken, nameof(accessToken)); + Argument.AssertNotNull(targetResourceId, nameof(targetResourceId)); + Argument.AssertNotNull(targetResourceRegion, nameof(targetResourceRegion)); + + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// The project name to be copied-into. + /// The access token. + /// The expiration of the access token. + /// Represents the target Azure resource ID. + /// Represents the target Azure resource region. + /// Keeps track of any properties unknown to the library. + internal CopyProjectDetails(ProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + TargetProjectName = targetProjectName; + AccessToken = accessToken; + ExpiresAt = expiresAt; + TargetResourceId = targetResourceId; + TargetResourceRegion = targetResourceRegion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectDetails() + { + } + + /// Represents the project kind. + public ProjectKind ProjectKind { get; set; } + /// The project name to be copied-into. + public string TargetProjectName { get; set; } + /// The access token. + public string AccessToken { get; set; } + /// The expiration of the access token. + public DateTimeOffset ExpiresAt { get; set; } + /// Represents the target Azure resource ID. + public string TargetResourceId { get; set; } + /// Represents the target Azure resource region. + public string TargetResourceRegion { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs new file mode 100644 index 000000000000..f920a14de3e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CopyProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CopyProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + + internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CopyProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + CopyProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCopyProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CopyProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCopyProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.cs new file mode 100644 index 000000000000..7c7212e10068 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CopyProjectJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a copy job. + public partial class CopyProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal CopyProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal CopyProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CopyProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..a432f8ae24e3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CreateDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CreateDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + + internal static CreateDeploymentDetails DeserializeCreateDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateDeploymentDetails(trainedModelLabel, assignedResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateDeploymentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateDeploymentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateDeploymentDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.cs new file mode 100644 index 000000000000..31478d43ba9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateDeploymentDetails.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for creating or updating a project deployment. + public partial class CreateDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the trained model label. + /// is null. + public CreateDeploymentDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the trained model label. + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + /// Keeps track of any properties unknown to the library. + internal CreateDeploymentDetails(string trainedModelLabel, IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateDeploymentDetails() + { + } + + /// Represents the trained model label. + public string TrainedModelLabel { get; } + /// Represents the resource IDs to be assigned to the deployment. If provided, the deployment will be rolled out to the resources provided here as well as the original resource in which the project is created. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs new file mode 100644 index 000000000000..06633dd50ab3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CreateProjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CreateProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + + internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = default; + string storageInputContainerName = default; + ProjectSettings settings = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateProjectDetails( + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support writing '{options.Format}' format."); + } + } + + CreateProjectDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCreateProjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateProjectDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CreateProjectDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCreateProjectDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.cs new file mode 100644 index 000000000000..4a9996f0b77c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CreateProjectDetails.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options used to create or update a project. + public partial class CreateProjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The project kind. + /// The storage container name. + /// The new project name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// , or is null. + public CreateProjectDetails(ProjectKind projectKind, string storageInputContainerName, string projectName, string language) + { + Argument.AssertNotNull(storageInputContainerName, nameof(storageInputContainerName)); + Argument.AssertNotNull(projectName, nameof(projectName)); + Argument.AssertNotNull(language, nameof(language)); + + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + ProjectName = projectName; + Language = language; + } + + /// Initializes a new instance of . + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal CreateProjectDetails(ProjectKind projectKind, string storageInputContainerName, ProjectSettings settings, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Settings = settings; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateProjectDetails() + { + } + + /// The project kind. + public ProjectKind ProjectKind { get; } + /// The storage container name. + public string StorageInputContainerName { get; } + /// The project settings. + public ProjectSettings Settings { get; set; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; set; } + /// The project description. + public string Description { get; set; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..c44a091cde5e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomEntityRecognitionDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customEntityRecognitionResult"u8); + writer.WriteObjectValue(CustomEntityRecognitionResult, options); + } + + CustomEntityRecognitionDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomEntityRecognitionDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomEntityRecognitionDocumentEvaluationResult DeserializeCustomEntityRecognitionDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customEntityRecognitionResult"u8)) + { + customEntityRecognitionResult = DocumentEntityRecognitionEvaluationResult.DeserializeDocumentEntityRecognitionEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomEntityRecognitionDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customEntityRecognitionResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomEntityRecognitionDocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomEntityRecognitionDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionDocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomEntityRecognitionDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomEntityRecognitionDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.cs new file mode 100644 index 000000000000..21e1cc79ba6f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionDocumentEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the document evaluation result for a custom entity recognition project. + public partial class CustomEntityRecognitionDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// , or is null. + internal CustomEntityRecognitionDocumentEvaluationResult(string location, string language, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customEntityRecognitionResult, nameof(customEntityRecognitionResult)); + + ProjectKind = ProjectKind.CustomEntityRecognition; + CustomEntityRecognitionResult = customEntityRecognitionResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for entity recognition. + internal CustomEntityRecognitionDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentEntityRecognitionEvaluationResult customEntityRecognitionResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomEntityRecognitionResult = customEntityRecognitionResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomEntityRecognitionDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for entity recognition. + public DocumentEntityRecognitionEvaluationResult CustomEntityRecognitionResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..02086fc20371 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomEntityRecognitionEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customEntityRecognitionEvaluation"u8); + writer.WriteObjectValue(CustomEntityRecognitionEvaluation, options); + } + + CustomEntityRecognitionEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomEntityRecognitionEvaluationSummary(document.RootElement, options); + } + + internal static CustomEntityRecognitionEvaluationSummary DeserializeCustomEntityRecognitionEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customEntityRecognitionEvaluation"u8)) + { + customEntityRecognitionEvaluation = EntityRecognitionEvaluationSummary.DeserializeEntityRecognitionEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomEntityRecognitionEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customEntityRecognitionEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomEntityRecognitionEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomEntityRecognitionEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomEntityRecognitionEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomEntityRecognitionEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomEntityRecognitionEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.cs new file mode 100644 index 000000000000..af1ea805f081 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomEntityRecognitionEvaluationSummary.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom entity recognition project. + public partial class CustomEntityRecognitionEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to extraction evaluation. + /// or is null. + internal CustomEntityRecognitionEvaluationSummary(EvaluationDetails evaluationOptions, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customEntityRecognitionEvaluation, nameof(customEntityRecognitionEvaluation)); + + ProjectKind = ProjectKind.CustomEntityRecognition; + CustomEntityRecognitionEvaluation = customEntityRecognitionEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to extraction evaluation. + internal CustomEntityRecognitionEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, EntityRecognitionEvaluationSummary customEntityRecognitionEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomEntityRecognitionEvaluation = customEntityRecognitionEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomEntityRecognitionEvaluationSummary() + { + } + + /// Contains the data related to extraction evaluation. + public EntityRecognitionEvaluationSummary CustomEntityRecognitionEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..726a1d144e16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomHealthcareDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customHealthcareResult"u8); + writer.WriteObjectValue(CustomHealthcareResult, options); + } + + CustomHealthcareDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHealthcareDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomHealthcareDocumentEvaluationResult DeserializeCustomHealthcareDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentHealthcareEvaluationResult customHealthcareResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customHealthcareResult"u8)) + { + customHealthcareResult = DocumentHealthcareEvaluationResult.DeserializeDocumentHealthcareEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHealthcareDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customHealthcareResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomHealthcareDocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHealthcareDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHealthcareDocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomHealthcareDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomHealthcareDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.cs new file mode 100644 index 000000000000..f89d84726837 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareDocumentEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the document evaluation result for a custom entity recognition project. + public partial class CustomHealthcareDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for entity recognition. + /// , or is null. + internal CustomHealthcareDocumentEvaluationResult(string location, string language, DocumentHealthcareEvaluationResult customHealthcareResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customHealthcareResult, nameof(customHealthcareResult)); + + ProjectKind = ProjectKind.CustomHealthcare; + CustomHealthcareResult = customHealthcareResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for entity recognition. + internal CustomHealthcareDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentHealthcareEvaluationResult customHealthcareResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomHealthcareResult = customHealthcareResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomHealthcareDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for entity recognition. + public DocumentHealthcareEvaluationResult CustomHealthcareResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..02df1aaacae0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomHealthcareEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customHealthcareEvaluation"u8); + writer.WriteObjectValue(CustomHealthcareEvaluation, options); + } + + CustomHealthcareEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHealthcareEvaluationSummary(document.RootElement, options); + } + + internal static CustomHealthcareEvaluationSummary DeserializeCustomHealthcareEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EntityRecognitionEvaluationSummary customHealthcareEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customHealthcareEvaluation"u8)) + { + customHealthcareEvaluation = EntityRecognitionEvaluationSummary.DeserializeEntityRecognitionEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHealthcareEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customHealthcareEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomHealthcareEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHealthcareEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHealthcareEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomHealthcareEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomHealthcareEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.cs new file mode 100644 index 000000000000..b42fd9a30698 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomHealthcareEvaluationSummary.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom health care project. + public partial class CustomHealthcareEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to health care evaluation. + /// or is null. + internal CustomHealthcareEvaluationSummary(EvaluationDetails evaluationOptions, EntityRecognitionEvaluationSummary customHealthcareEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customHealthcareEvaluation, nameof(customHealthcareEvaluation)); + + ProjectKind = ProjectKind.CustomHealthcare; + CustomHealthcareEvaluation = customHealthcareEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to health care evaluation. + internal CustomHealthcareEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, EntityRecognitionEvaluationSummary customHealthcareEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomHealthcareEvaluation = customHealthcareEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomHealthcareEvaluationSummary() + { + } + + /// Contains the data related to health care evaluation. + public EntityRecognitionEvaluationSummary CustomHealthcareEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..242c6b8fb74c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customMultiLabelClassificationResult"u8); + writer.WriteObjectValue(CustomMultiLabelClassificationResult, options); + } + + CustomMultiLabelClassificationDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomMultiLabelClassificationDocumentEvaluationResult DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customMultiLabelClassificationResult"u8)) + { + customMultiLabelClassificationResult = DocumentMultiLabelClassificationEvaluationResult.DeserializeDocumentMultiLabelClassificationEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomMultiLabelClassificationDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customMultiLabelClassificationResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomMultiLabelClassificationDocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationDocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomMultiLabelClassificationDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.cs new file mode 100644 index 000000000000..b313a7e7bf08 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationDocumentEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the document evaluation result for a custom multi-label classification project. + public partial class CustomMultiLabelClassificationDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for multi label classification. + /// , or is null. + internal CustomMultiLabelClassificationDocumentEvaluationResult(string location, string language, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customMultiLabelClassificationResult, nameof(customMultiLabelClassificationResult)); + + ProjectKind = ProjectKind.CustomMultiLabelClassification; + CustomMultiLabelClassificationResult = customMultiLabelClassificationResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for multi label classification. + internal CustomMultiLabelClassificationDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentMultiLabelClassificationEvaluationResult customMultiLabelClassificationResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomMultiLabelClassificationResult = customMultiLabelClassificationResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomMultiLabelClassificationDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for multi label classification. + public DocumentMultiLabelClassificationEvaluationResult CustomMultiLabelClassificationResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..95bcd9182059 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomMultiLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customMultiLabelClassificationEvaluation"u8); + writer.WriteObjectValue(CustomMultiLabelClassificationEvaluation, options); + } + + CustomMultiLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static CustomMultiLabelClassificationEvaluationSummary DeserializeCustomMultiLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customMultiLabelClassificationEvaluation"u8)) + { + customMultiLabelClassificationEvaluation = MultiLabelClassificationEvaluationSummary.DeserializeMultiLabelClassificationEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomMultiLabelClassificationEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customMultiLabelClassificationEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomMultiLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomMultiLabelClassificationEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomMultiLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomMultiLabelClassificationEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..89dfb90ee5bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomMultiLabelClassificationEvaluationSummary.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom multi-label classification project. + public partial class CustomMultiLabelClassificationEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to multi label classification evaluation. + /// or is null. + internal CustomMultiLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customMultiLabelClassificationEvaluation, nameof(customMultiLabelClassificationEvaluation)); + + ProjectKind = ProjectKind.CustomMultiLabelClassification; + CustomMultiLabelClassificationEvaluation = customMultiLabelClassificationEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to multi label classification evaluation. + internal CustomMultiLabelClassificationEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, MultiLabelClassificationEvaluationSummary customMultiLabelClassificationEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomMultiLabelClassificationEvaluation = customMultiLabelClassificationEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomMultiLabelClassificationEvaluationSummary() + { + } + + /// Contains the data related to multi label classification evaluation. + public MultiLabelClassificationEvaluationSummary CustomMultiLabelClassificationEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..57861eb5a1b5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customSingleLabelClassificationResult"u8); + writer.WriteObjectValue(CustomSingleLabelClassificationResult, options); + } + + CustomSingleLabelClassificationDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomSingleLabelClassificationDocumentEvaluationResult DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customSingleLabelClassificationResult"u8)) + { + customSingleLabelClassificationResult = DocumentSingleLabelClassificationEvaluationResult.DeserializeDocumentSingleLabelClassificationEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomSingleLabelClassificationDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customSingleLabelClassificationResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomSingleLabelClassificationDocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationDocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomSingleLabelClassificationDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.cs new file mode 100644 index 000000000000..5bae1e7e6c4c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationDocumentEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the document evaluation result for a custom single-label classification project. + public partial class CustomSingleLabelClassificationDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for single label classification. + /// , or is null. + internal CustomSingleLabelClassificationDocumentEvaluationResult(string location, string language, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customSingleLabelClassificationResult, nameof(customSingleLabelClassificationResult)); + + ProjectKind = ProjectKind.CustomSingleLabelClassification; + CustomSingleLabelClassificationResult = customSingleLabelClassificationResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for single label classification. + internal CustomSingleLabelClassificationDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentSingleLabelClassificationEvaluationResult customSingleLabelClassificationResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomSingleLabelClassificationResult = customSingleLabelClassificationResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomSingleLabelClassificationDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for single label classification. + public DocumentSingleLabelClassificationEvaluationResult CustomSingleLabelClassificationResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..06c9c7209461 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomSingleLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customSingleLabelClassificationEvaluation"u8); + writer.WriteObjectValue(CustomSingleLabelClassificationEvaluation, options); + } + + CustomSingleLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static CustomSingleLabelClassificationEvaluationSummary DeserializeCustomSingleLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customSingleLabelClassificationEvaluation"u8)) + { + customSingleLabelClassificationEvaluation = SingleLabelClassificationEvaluationSummary.DeserializeSingleLabelClassificationEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomSingleLabelClassificationEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customSingleLabelClassificationEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomSingleLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomSingleLabelClassificationEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomSingleLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomSingleLabelClassificationEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..01cb6675593c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomSingleLabelClassificationEvaluationSummary.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom single-label classification project. + public partial class CustomSingleLabelClassificationEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to single label classification evaluation. + /// or is null. + internal CustomSingleLabelClassificationEvaluationSummary(EvaluationDetails evaluationOptions, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customSingleLabelClassificationEvaluation, nameof(customSingleLabelClassificationEvaluation)); + + ProjectKind = ProjectKind.CustomSingleLabelClassification; + CustomSingleLabelClassificationEvaluation = customSingleLabelClassificationEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to single label classification evaluation. + internal CustomSingleLabelClassificationEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, SingleLabelClassificationEvaluationSummary customSingleLabelClassificationEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomSingleLabelClassificationEvaluation = customSingleLabelClassificationEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomSingleLabelClassificationEvaluationSummary() + { + } + + /// Contains the data related to single label classification evaluation. + public SingleLabelClassificationEvaluationSummary CustomSingleLabelClassificationEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..60121f8ea4a9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomTextSentimentDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customTextSentimentResult"u8); + writer.WriteObjectValue(CustomTextSentimentResult, options); + } + + CustomTextSentimentDocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomTextSentimentDocumentEvaluationResult(document.RootElement, options); + } + + internal static CustomTextSentimentDocumentEvaluationResult DeserializeCustomTextSentimentDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentTextSentimentEvaluationResult customTextSentimentResult = default; + ProjectKind projectKind = default; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customTextSentimentResult"u8)) + { + customTextSentimentResult = DocumentTextSentimentEvaluationResult.DeserializeDocumentTextSentimentEvaluationResult(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomTextSentimentDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData, customTextSentimentResult); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + CustomTextSentimentDocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomTextSentimentDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomTextSentimentDocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomTextSentimentDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomTextSentimentDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.cs new file mode 100644 index 000000000000..ab07896bc858 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentDocumentEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the document evaluation result for a custom sentiment project. + public partial class CustomTextSentimentDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Represents the evaluation prediction for text sentiment. + /// , or is null. + internal CustomTextSentimentDocumentEvaluationResult(string location, string language, DocumentTextSentimentEvaluationResult customTextSentimentResult) : base(location, language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(customTextSentimentResult, nameof(customTextSentimentResult)); + + ProjectKind = ProjectKind.CustomTextSentiment; + CustomTextSentimentResult = customTextSentimentResult; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + /// Represents the evaluation prediction for text sentiment. + internal CustomTextSentimentDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData, DocumentTextSentimentEvaluationResult customTextSentimentResult) : base(projectKind, location, language, serializedAdditionalRawData) + { + CustomTextSentimentResult = customTextSentimentResult; + } + + /// Initializes a new instance of for deserialization. + internal CustomTextSentimentDocumentEvaluationResult() + { + } + + /// Represents the evaluation prediction for text sentiment. + public DocumentTextSentimentEvaluationResult CustomTextSentimentResult { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..4946c6b8b920 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class CustomTextSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("customTextSentimentEvaluation"u8); + writer.WriteObjectValue(CustomTextSentimentEvaluation, options); + } + + CustomTextSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomTextSentimentEvaluationSummary(document.RootElement, options); + } + + internal static CustomTextSentimentEvaluationSummary DeserializeCustomTextSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextSentimentEvaluationSummary customTextSentimentEvaluation = default; + ProjectKind projectKind = default; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customTextSentimentEvaluation"u8)) + { + customTextSentimentEvaluation = TextSentimentEvaluationSummary.DeserializeTextSentimentEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomTextSentimentEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData, customTextSentimentEvaluation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + CustomTextSentimentEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomTextSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomTextSentimentEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new CustomTextSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCustomTextSentimentEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..8c2df398ef37 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/CustomTextSentimentEvaluationSummary.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom text sentiment project. + public partial class CustomTextSentimentEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Contains the data related to custom sentiment evaluation. + /// or is null. + internal CustomTextSentimentEvaluationSummary(EvaluationDetails evaluationOptions, TextSentimentEvaluationSummary customTextSentimentEvaluation) : base(evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(customTextSentimentEvaluation, nameof(customTextSentimentEvaluation)); + + ProjectKind = ProjectKind.CustomTextSentiment; + CustomTextSentimentEvaluation = customTextSentimentEvaluation; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + /// Contains the data related to custom sentiment evaluation. + internal CustomTextSentimentEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData, TextSentimentEvaluationSummary customTextSentimentEvaluation) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + CustomTextSentimentEvaluation = customTextSentimentEvaluation; + } + + /// Initializes a new instance of for deserialization. + internal CustomTextSentimentEvaluationSummary() + { + } + + /// Contains the data related to custom sentiment evaluation. + public TextSentimentEvaluationSummary CustomTextSentimentEvaluation { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.Serialization.cs new file mode 100644 index 000000000000..4a5bdf19b9c7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DataGenerationConnectionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataGenerationConnectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationConnectionInfo(document.RootElement, options); + } + + internal static DataGenerationConnectionInfo DeserializeDataGenerationConnectionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationConnectionInfoKind kind = default; + string resourceId = default; + string deploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new DataGenerationConnectionInfoKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataGenerationConnectionInfo(kind, resourceId, deploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support writing '{options.Format}' format."); + } + } + + DataGenerationConnectionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDataGenerationConnectionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationConnectionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DataGenerationConnectionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDataGenerationConnectionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.cs new file mode 100644 index 000000000000..a7dbaf33884a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfo.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + public partial class DataGenerationConnectionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// or is null. + public DataGenerationConnectionInfo(string resourceId, string deploymentName) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(deploymentName, nameof(deploymentName)); + + ResourceId = resourceId; + DeploymentName = deploymentName; + } + + /// Initializes a new instance of . + /// Connection type for data generation settings. Currently only supports Azure Open AI. + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + /// Deployment name of model to be used for synthetic data generation. + /// Keeps track of any properties unknown to the library. + internal DataGenerationConnectionInfo(DataGenerationConnectionInfoKind kind, string resourceId, string deploymentName, IDictionary serializedAdditionalRawData) + { + Kind = kind; + ResourceId = resourceId; + DeploymentName = deploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataGenerationConnectionInfo() + { + } + + /// Connection type for data generation settings. Currently only supports Azure Open AI. + public DataGenerationConnectionInfoKind Kind { get; } = DataGenerationConnectionInfoKind.AzureOpenAI; + + /// Resource ID for the data generation resource. Looks something like "/subscriptions/<SUBSCRIPTION-ID-GUID>/resourceGroups/<RG-NAME>/providers/Microsoft.CognitiveServices/accounts/<AOAI-ACCOUNT-NAME>". + public string ResourceId { get; } + /// Deployment name of model to be used for synthetic data generation. + public string DeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.cs new file mode 100644 index 000000000000..2fc2bf8a9467 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationConnectionInfoKind.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The DataGenerationConnectionInfo_kind. + public readonly partial struct DataGenerationConnectionInfoKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataGenerationConnectionInfoKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureOpenAIValue = "azureOpenAI"; + + /// azureOpenAI. + public static DataGenerationConnectionInfoKind AzureOpenAI { get; } = new DataGenerationConnectionInfoKind(AzureOpenAIValue); + /// Determines if two values are the same. + public static bool operator ==(DataGenerationConnectionInfoKind left, DataGenerationConnectionInfoKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataGenerationConnectionInfoKind left, DataGenerationConnectionInfoKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataGenerationConnectionInfoKind(string value) => new DataGenerationConnectionInfoKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationConnectionInfoKind other && Equals(other); + /// + public bool Equals(DataGenerationConnectionInfoKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.Serialization.cs new file mode 100644 index 000000000000..02b4ca7c8475 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DataGenerationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("enableDataGeneration"u8); + writer.WriteBooleanValue(EnableDataGeneration); + writer.WritePropertyName("dataGenerationConnectionInfo"u8); + writer.WriteObjectValue(DataGenerationConnectionInfo, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataGenerationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationSettings(document.RootElement, options); + } + + internal static DataGenerationSettings DeserializeDataGenerationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enableDataGeneration = default; + DataGenerationConnectionInfo dataGenerationConnectionInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableDataGeneration"u8)) + { + enableDataGeneration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dataGenerationConnectionInfo"u8)) + { + dataGenerationConnectionInfo = DataGenerationConnectionInfo.DeserializeDataGenerationConnectionInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataGenerationSettings(enableDataGeneration, dataGenerationConnectionInfo, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support writing '{options.Format}' format."); + } + } + + DataGenerationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDataGenerationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DataGenerationSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDataGenerationSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.cs new file mode 100644 index 000000000000..ec47c688c67e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DataGenerationSettings.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the settings for using data generation as part of training a custom model. + public partial class DataGenerationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + /// is null. + public DataGenerationSettings(bool enableDataGeneration, DataGenerationConnectionInfo dataGenerationConnectionInfo) + { + Argument.AssertNotNull(dataGenerationConnectionInfo, nameof(dataGenerationConnectionInfo)); + + EnableDataGeneration = enableDataGeneration; + DataGenerationConnectionInfo = dataGenerationConnectionInfo; + } + + /// Initializes a new instance of . + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + /// Keeps track of any properties unknown to the library. + internal DataGenerationSettings(bool enableDataGeneration, DataGenerationConnectionInfo dataGenerationConnectionInfo, IDictionary serializedAdditionalRawData) + { + EnableDataGeneration = enableDataGeneration; + DataGenerationConnectionInfo = dataGenerationConnectionInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataGenerationSettings() + { + } + + /// If set to true, augment customer provided training data with synthetic data to improve model quality. + public bool EnableDataGeneration { get; } + /// Represents the connection info for the Azure resource to use during data generation as part of training a custom model. + public DataGenerationConnectionInfo DataGenerationConnectionInfo { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs new file mode 100644 index 000000000000..77445449cbf0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DeleteDeploymentDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AssignedResourceIds)) + { + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeleteDeploymentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + + internal static DeleteDeploymentDetails DeserializeDeleteDeploymentDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeleteDeploymentDetails(assignedResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support writing '{options.Format}' format."); + } + } + + DeleteDeploymentDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeleteDeploymentDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeleteDeploymentDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeleteDeploymentDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeleteDeploymentDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs new file mode 100644 index 000000000000..013bd28896db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeleteDeploymentDetails.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for deleting a project deployment. + public partial class DeleteDeploymentDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeleteDeploymentDetails() + { + AssignedResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + /// Keeps track of any properties unknown to the library. + internal DeleteDeploymentDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the resource IDs to delete the deployment from. If not provided, the deployment will be rolled out from all the resources it is deployed to. If provided, it will delete the deployment only from the specified assigned resources, and leave it for the rest. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..e10e17952121 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DeploymentDeleteFromResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentDeleteFromResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + + internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDeleteFromResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentDeleteFromResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentDeleteFromResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentDeleteFromResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs new file mode 100644 index 000000000000..6a8b7545d2f6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an existing delete deployment from specific resources job. + public partial class DeploymentDeleteFromResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentDeleteFromResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentDeleteFromResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentDeleteFromResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs new file mode 100644 index 000000000000..abc14808d6d1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DeploymentJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentJobState(document.RootElement, options); + } + + internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support writing '{options.Format}' format."); + } + } + + DeploymentJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.cs new file mode 100644 index 000000000000..f888f341cfa1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class DeploymentJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal DeploymentJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal DeploymentJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs new file mode 100644 index 000000000000..326ec2ad2885 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DeploymentResource : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentResource(document.RootElement, options); + } + + internal static DeploymentResource DeserializeDeploymentResource(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentResource(resourceId, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support writing '{options.Format}' format."); + } + } + + DeploymentResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentResource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentResource)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DeploymentResource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDeploymentResource(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.cs new file mode 100644 index 000000000000..1f71c697bb26 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DeploymentResource.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an Azure resource assigned to a deployment. + public partial class DeploymentResource + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// or is null. + internal DeploymentResource(string resourceId, string region) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + Argument.AssertNotNull(region, nameof(region)); + + ResourceId = resourceId; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource Id. + /// Represents the resource region. + /// Keeps track of any properties unknown to the library. + internal DeploymentResource(string resourceId, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentResource() + { + } + + /// Represents the Azure resource Id. + public string ResourceId { get; } + /// Represents the resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..13631a460ef0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentEntityLabelEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityLabelEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentEntityLabelEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityLabelEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEntityLabelEvaluationResult(document.RootElement, options); + } + + internal static DocumentEntityLabelEvaluationResult DeserializeDocumentEntityLabelEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentEntityLabelEvaluationResult(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEntityLabelEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEntityLabelEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentEntityLabelEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEntityLabelEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentEntityLabelEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEntityLabelEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.cs new file mode 100644 index 000000000000..9845875ce00c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityLabelEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an evaluation result entity label. + public partial class DocumentEntityLabelEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// is null. + internal DocumentEntityLabelEvaluationResult(string category, int offset, int length) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the entity category. + /// Represents the entity offset index relative to the original text. + /// Represents the entity length. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityLabelEvaluationResult(string category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityLabelEvaluationResult() + { + } + + /// Represents the entity category. + public string Category { get; } + /// Represents the entity offset index relative to the original text. + public int Offset { get; } + /// Represents the entity length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..9aff1eb0d6b0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentEntityRecognitionEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentEntityRecognitionEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEntityRecognitionEvaluationResult(document.RootElement, options); + } + + internal static DocumentEntityRecognitionEvaluationResult DeserializeDocumentEntityRecognitionEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList entities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityRegionEvaluationResult.DeserializeDocumentEntityRegionEvaluationResult(item, options)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentEntityRecognitionEvaluationResult(entities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEntityRecognitionEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentEntityRecognitionEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEntityRecognitionEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentEntityRecognitionEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEntityRecognitionEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs new file mode 100644 index 000000000000..8a2ca5336833 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRecognitionEvaluationResult.cs @@ -0,0 +1,76 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the entity recognition evaluation result for a document. + public partial class DocumentEntityRecognitionEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// is null. + internal DocumentEntityRecognitionEvaluationResult(IEnumerable entities) + { + Argument.AssertNotNull(entities, nameof(entities)); + + Entities = entities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityRecognitionEvaluationResult(IReadOnlyList entities, IDictionary serializedAdditionalRawData) + { + Entities = entities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityRecognitionEvaluationResult() + { + } + + /// Represents the document labelled entities. + public IReadOnlyList Entities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..6102fe7633be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentEntityRegionEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedEntities"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedEntities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedEntities"u8); + writer.WriteStartArray(); + foreach (var item in PredictedEntities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("regionOffset"u8); + writer.WriteNumberValue(RegionOffset); + writer.WritePropertyName("regionLength"u8); + writer.WriteNumberValue(RegionLength); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentEntityRegionEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement, options); + } + + internal static DocumentEntityRegionEvaluationResult DeserializeDocumentEntityRegionEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedEntities = default; + IReadOnlyList predictedEntities = default; + int regionOffset = default; + int regionLength = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityLabelEvaluationResult.DeserializeDocumentEntityLabelEvaluationResult(item, options)); + } + expectedEntities = array; + continue; + } + if (property.NameEquals("predictedEntities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityLabelEvaluationResult.DeserializeDocumentEntityLabelEvaluationResult(item, options)); + } + predictedEntities = array; + continue; + } + if (property.NameEquals("regionOffset"u8)) + { + regionOffset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("regionLength"u8)) + { + regionLength = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentEntityRegionEvaluationResult(expectedEntities, predictedEntities, regionOffset, regionLength, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEntityRegionEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEntityRegionEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentEntityRegionEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEntityRegionEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs new file mode 100644 index 000000000000..f961a2eb7ba7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEntityRegionEvaluationResult.cs @@ -0,0 +1,95 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the evaluation comparison between the expected and predicted entities of a document region. + public partial class DocumentEntityRegionEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// or is null. + internal DocumentEntityRegionEvaluationResult(IEnumerable expectedEntities, IEnumerable predictedEntities, int regionOffset, int regionLength) + { + Argument.AssertNotNull(expectedEntities, nameof(expectedEntities)); + Argument.AssertNotNull(predictedEntities, nameof(predictedEntities)); + + ExpectedEntities = expectedEntities.ToList(); + PredictedEntities = predictedEntities.ToList(); + RegionOffset = regionOffset; + RegionLength = regionLength; + } + + /// Initializes a new instance of . + /// Represents the region's expected entity labels. + /// Represents the region's predicted entity labels. + /// Represents the region offset. + /// Represents the region length. + /// Keeps track of any properties unknown to the library. + internal DocumentEntityRegionEvaluationResult(IReadOnlyList expectedEntities, IReadOnlyList predictedEntities, int regionOffset, int regionLength, IDictionary serializedAdditionalRawData) + { + ExpectedEntities = expectedEntities; + PredictedEntities = predictedEntities; + RegionOffset = regionOffset; + RegionLength = regionLength; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEntityRegionEvaluationResult() + { + } + + /// Represents the region's expected entity labels. + public IReadOnlyList ExpectedEntities { get; } + /// Represents the region's predicted entity labels. + public IReadOnlyList PredictedEntities { get; } + /// Represents the region offset. + public int RegionOffset { get; } + /// Represents the region length. + public int RegionLength { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..be013318e43f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownDocumentEvaluationResult))] + public partial class DocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + + internal static DocumentEvaluationResult DeserializeDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomEntityRecognition": return CustomEntityRecognitionDocumentEvaluationResult.DeserializeCustomEntityRecognitionDocumentEvaluationResult(element, options); + case "CustomHealthcare": return CustomHealthcareDocumentEvaluationResult.DeserializeCustomHealthcareDocumentEvaluationResult(element, options); + case "CustomMultiLabelClassification": return CustomMultiLabelClassificationDocumentEvaluationResult.DeserializeCustomMultiLabelClassificationDocumentEvaluationResult(element, options); + case "CustomSingleLabelClassification": return CustomSingleLabelClassificationDocumentEvaluationResult.DeserializeCustomSingleLabelClassificationDocumentEvaluationResult(element, options); + case "CustomTextSentiment": return CustomTextSentimentDocumentEvaluationResult.DeserializeCustomTextSentimentDocumentEvaluationResult(element, options); + } + } + return UnknownDocumentEvaluationResult.DeserializeUnknownDocumentEvaluationResult(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.cs new file mode 100644 index 000000000000..1eb6a64b3511 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentEvaluationResult.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// + /// Represents the evaluation result of a document. + /// 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 DocumentEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + protected DocumentEvaluationResult(string location, string language) + { + Argument.AssertNotNull(location, nameof(location)); + Argument.AssertNotNull(language, nameof(language)); + + Location = location; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal DocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + Location = location; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentEvaluationResult() + { + } + + /// Represents the project kind. + internal ProjectKind ProjectKind { get; set; } + /// Represents the document path. + public string Location { get; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..5e07d6d93ee0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentHealthcareEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentHealthcareEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentHealthcareEvaluationResult(document.RootElement, options); + } + + internal static DocumentHealthcareEvaluationResult DeserializeDocumentHealthcareEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList entities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentEntityRegionEvaluationResult.DeserializeDocumentEntityRegionEvaluationResult(item, options)); + } + entities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentHealthcareEvaluationResult(entities, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentHealthcareEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentHealthcareEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentHealthcareEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentHealthcareEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentHealthcareEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs new file mode 100644 index 000000000000..abb12a64155d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentHealthcareEvaluationResult.cs @@ -0,0 +1,76 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the healthcare evaluation result for a document. + public partial class DocumentHealthcareEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// is null. + internal DocumentHealthcareEvaluationResult(IEnumerable entities) + { + Argument.AssertNotNull(entities, nameof(entities)); + + Entities = entities.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document labelled entities. + /// Keeps track of any properties unknown to the library. + internal DocumentHealthcareEvaluationResult(IReadOnlyList entities, IDictionary serializedAdditionalRawData) + { + Entities = entities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentHealthcareEvaluationResult() + { + } + + /// Represents the document labelled entities. + public IReadOnlyList Entities { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..75e31cc7c7fe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentMultiLabelClassificationEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedClasses"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedClasses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedClasses"u8); + writer.WriteStartArray(); + foreach (var item in PredictedClasses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentMultiLabelClassificationEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentMultiLabelClassificationEvaluationResult(document.RootElement, options); + } + + internal static DocumentMultiLabelClassificationEvaluationResult DeserializeDocumentMultiLabelClassificationEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedClasses = default; + IReadOnlyList predictedClasses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedClasses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + expectedClasses = array; + continue; + } + if (property.NameEquals("predictedClasses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + predictedClasses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentMultiLabelClassificationEvaluationResult(expectedClasses, predictedClasses, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentMultiLabelClassificationEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentMultiLabelClassificationEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentMultiLabelClassificationEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentMultiLabelClassificationEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentMultiLabelClassificationEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.cs new file mode 100644 index 000000000000..0b5e696def25 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentMultiLabelClassificationEvaluationResult.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.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted classes that are result from the evaluation operation. + public partial class DocumentMultiLabelClassificationEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// or is null. + internal DocumentMultiLabelClassificationEvaluationResult(IEnumerable expectedClasses, IEnumerable predictedClasses) + { + Argument.AssertNotNull(expectedClasses, nameof(expectedClasses)); + Argument.AssertNotNull(predictedClasses, nameof(predictedClasses)); + + ExpectedClasses = expectedClasses.ToList(); + PredictedClasses = predictedClasses.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document's expected classes. + /// Represents the document's predicted classes. + /// Keeps track of any properties unknown to the library. + internal DocumentMultiLabelClassificationEvaluationResult(IReadOnlyList expectedClasses, IReadOnlyList predictedClasses, IDictionary serializedAdditionalRawData) + { + ExpectedClasses = expectedClasses; + PredictedClasses = predictedClasses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentMultiLabelClassificationEvaluationResult() + { + } + + /// Represents the document's expected classes. + public IReadOnlyList ExpectedClasses { get; } + /// Represents the document's predicted classes. + public IReadOnlyList PredictedClasses { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..6331cb3ab415 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentSentimentLabelEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.ToString()); + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset); + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentSentimentLabelEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentSentimentLabelEvaluationResult(document.RootElement, options); + } + + internal static DocumentSentimentLabelEvaluationResult DeserializeDocumentSentimentLabelEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextAnalysisAuthoringSentiment category = default; + int offset = default; + int length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new TextAnalysisAuthoringSentiment(property.Value.GetString()); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentSentimentLabelEvaluationResult(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentSentimentLabelEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentSentimentLabelEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentSentimentLabelEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentSentimentLabelEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSentimentLabelEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.cs new file mode 100644 index 000000000000..ca2ed6833c38 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSentimentLabelEvaluationResult.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an evaluation result Sentiment label. + public partial class DocumentSentimentLabelEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + internal DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category, int offset, int length) + { + Category = category; + Offset = offset; + Length = length; + } + + /// Initializes a new instance of . + /// Represents the sentiment category. + /// Represents the sentiment offset index relative to the original text. + /// Represents the sentiment length. + /// Keeps track of any properties unknown to the library. + internal DocumentSentimentLabelEvaluationResult(TextAnalysisAuthoringSentiment category, int offset, int length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentSentimentLabelEvaluationResult() + { + } + + /// Represents the sentiment category. + public TextAnalysisAuthoringSentiment Category { get; } + /// Represents the sentiment offset index relative to the original text. + public int Offset { get; } + /// Represents the sentiment length. + public int Length { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..3b5eb266d588 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentSingleLabelClassificationEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedClass"u8); + writer.WriteStringValue(ExpectedClass); + writer.WritePropertyName("predictedClass"u8); + writer.WriteStringValue(PredictedClass); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentSingleLabelClassificationEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentSingleLabelClassificationEvaluationResult(document.RootElement, options); + } + + internal static DocumentSingleLabelClassificationEvaluationResult DeserializeDocumentSingleLabelClassificationEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string expectedClass = default; + string predictedClass = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedClass"u8)) + { + expectedClass = property.Value.GetString(); + continue; + } + if (property.NameEquals("predictedClass"u8)) + { + predictedClass = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentSingleLabelClassificationEvaluationResult(expectedClass, predictedClass, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentSingleLabelClassificationEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentSingleLabelClassificationEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentSingleLabelClassificationEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentSingleLabelClassificationEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentSingleLabelClassificationEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.cs new file mode 100644 index 000000000000..c9e158bbc731 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentSingleLabelClassificationEvaluationResult.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted class that result from an evaluation operation. + public partial class DocumentSingleLabelClassificationEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// or is null. + internal DocumentSingleLabelClassificationEvaluationResult(string expectedClass, string predictedClass) + { + Argument.AssertNotNull(expectedClass, nameof(expectedClass)); + Argument.AssertNotNull(predictedClass, nameof(predictedClass)); + + ExpectedClass = expectedClass; + PredictedClass = predictedClass; + } + + /// Initializes a new instance of . + /// Represents the document's expected class. + /// Represents the document's predicted class. + /// Keeps track of any properties unknown to the library. + internal DocumentSingleLabelClassificationEvaluationResult(string expectedClass, string predictedClass, IDictionary serializedAdditionalRawData) + { + ExpectedClass = expectedClass; + PredictedClass = predictedClass; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentSingleLabelClassificationEvaluationResult() + { + } + + /// Represents the document's expected class. + public string ExpectedClass { get; } + /// Represents the document's predicted class. + public string PredictedClass { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..2c2a0bff2696 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class DocumentTextSentimentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expectedSentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in ExpectedSentimentSpans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("predictedSentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in PredictedSentimentSpans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DocumentTextSentimentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentTextSentimentEvaluationResult(document.RootElement, options); + } + + internal static DocumentTextSentimentEvaluationResult DeserializeDocumentTextSentimentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList expectedSentimentSpans = default; + IReadOnlyList predictedSentimentSpans = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expectedSentimentSpans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSentimentLabelEvaluationResult.DeserializeDocumentSentimentLabelEvaluationResult(item, options)); + } + expectedSentimentSpans = array; + continue; + } + if (property.NameEquals("predictedSentimentSpans"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentSentimentLabelEvaluationResult.DeserializeDocumentSentimentLabelEvaluationResult(item, options)); + } + predictedSentimentSpans = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentTextSentimentEvaluationResult(expectedSentimentSpans, predictedSentimentSpans, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentTextSentimentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentTextSentimentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentTextSentimentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentTextSentimentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDocumentTextSentimentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.cs new file mode 100644 index 000000000000..3e547f73170e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/DocumentTextSentimentEvaluationResult.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.Linq; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the comparison between the expected and predicted sentiment that result from an evaluation operation. + public partial class DocumentTextSentimentEvaluationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// or is null. + internal DocumentTextSentimentEvaluationResult(IEnumerable expectedSentimentSpans, IEnumerable predictedSentimentSpans) + { + Argument.AssertNotNull(expectedSentimentSpans, nameof(expectedSentimentSpans)); + Argument.AssertNotNull(predictedSentimentSpans, nameof(predictedSentimentSpans)); + + ExpectedSentimentSpans = expectedSentimentSpans.ToList(); + PredictedSentimentSpans = predictedSentimentSpans.ToList(); + } + + /// Initializes a new instance of . + /// Represents the document's expected sentiment labels. + /// Represents the document's predicted sentiment labels. + /// Keeps track of any properties unknown to the library. + internal DocumentTextSentimentEvaluationResult(IReadOnlyList expectedSentimentSpans, IReadOnlyList predictedSentimentSpans, IDictionary serializedAdditionalRawData) + { + ExpectedSentimentSpans = expectedSentimentSpans; + PredictedSentimentSpans = predictedSentimentSpans; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DocumentTextSentimentEvaluationResult() + { + } + + /// Represents the document's expected sentiment labels. + public IReadOnlyList ExpectedSentimentSpans { get; } + /// Represents the document's predicted sentiment labels. + public IReadOnlyList PredictedSentimentSpans { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..5826c81af6f9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EntityEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EntityEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + + internal static EntityEvaluationSummary DeserializeEntityEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntityEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EntityEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.cs new file mode 100644 index 000000000000..9cdb7004ae61 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for an entity. + public partial class EntityEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal EntityEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..6ba8e6fbc90d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EntityRecognitionEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("entities"u8); + writer.WriteStartObject(); + foreach (var item in Entities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EntityRecognitionEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityRecognitionEvaluationSummary(document.RootElement, options); + } + + internal static EntityRecognitionEvaluationSummary DeserializeEntityRecognitionEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary entities = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("entities"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EntityEvaluationSummary.DeserializeEntityEvaluationSummary(property0.Value, options)); + } + entities = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityRecognitionEvaluationSummary( + confusionMatrix, + entities, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EntityRecognitionEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEntityRecognitionEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityRecognitionEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EntityRecognitionEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityRecognitionEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.cs new file mode 100644 index 000000000000..d397bd5cbc09 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EntityRecognitionEvaluationSummary.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom entity recognition project. + public partial class EntityRecognitionEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(entities, nameof(entities)); + + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + /// Represents the entities evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal EntityRecognitionEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Entities = entities; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EntityRecognitionEvaluationSummary() + { + } + + /// Represents the confusion matrix between two entities (the two entities can be the same). The matrix is between the entity that was labelled and the entity that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the entities evaluation. + public IReadOnlyDictionary Entities { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.cs new file mode 100644 index 000000000000..b25c560b3483 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ErrorCode.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct ErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidArgumentValue = "InvalidArgument"; + private const string UnauthorizedValue = "Unauthorized"; + private const string ForbiddenValue = "Forbidden"; + private const string NotFoundValue = "NotFound"; + private const string ProjectNotFoundValue = "ProjectNotFound"; + private const string OperationNotFoundValue = "OperationNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchIndexNotFoundValue = "AzureCognitiveSearchIndexNotFound"; + private const string TooManyRequestsValue = "TooManyRequests"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string AzureCognitiveSearchIndexLimitReachedValue = "AzureCognitiveSearchIndexLimitReached"; + private const string InternalServerErrorValue = "InternalServerError"; + private const string ServiceUnavailableValue = "ServiceUnavailable"; + private const string TimeoutValue = "Timeout"; + private const string QuotaExceededValue = "QuotaExceeded"; + private const string ConflictValue = "Conflict"; + private const string WarningValue = "Warning"; + + /// InvalidRequest. + public static ErrorCode InvalidRequest { get; } = new ErrorCode(InvalidRequestValue); + /// InvalidArgument. + public static ErrorCode InvalidArgument { get; } = new ErrorCode(InvalidArgumentValue); + /// Unauthorized. + public static ErrorCode Unauthorized { get; } = new ErrorCode(UnauthorizedValue); + /// Forbidden. + public static ErrorCode Forbidden { get; } = new ErrorCode(ForbiddenValue); + /// NotFound. + public static ErrorCode NotFound { get; } = new ErrorCode(NotFoundValue); + /// ProjectNotFound. + public static ErrorCode ProjectNotFound { get; } = new ErrorCode(ProjectNotFoundValue); + /// OperationNotFound. + public static ErrorCode OperationNotFound { get; } = new ErrorCode(OperationNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static ErrorCode AzureCognitiveSearchNotFound { get; } = new ErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchIndexNotFound. + public static ErrorCode AzureCognitiveSearchIndexNotFound { get; } = new ErrorCode(AzureCognitiveSearchIndexNotFoundValue); + /// TooManyRequests. + public static ErrorCode TooManyRequests { get; } = new ErrorCode(TooManyRequestsValue); + /// AzureCognitiveSearchThrottling. + public static ErrorCode AzureCognitiveSearchThrottling { get; } = new ErrorCode(AzureCognitiveSearchThrottlingValue); + /// AzureCognitiveSearchIndexLimitReached. + public static ErrorCode AzureCognitiveSearchIndexLimitReached { get; } = new ErrorCode(AzureCognitiveSearchIndexLimitReachedValue); + /// InternalServerError. + public static ErrorCode InternalServerError { get; } = new ErrorCode(InternalServerErrorValue); + /// ServiceUnavailable. + public static ErrorCode ServiceUnavailable { get; } = new ErrorCode(ServiceUnavailableValue); + /// Timeout. + public static ErrorCode Timeout { get; } = new ErrorCode(TimeoutValue); + /// QuotaExceeded. + public static ErrorCode QuotaExceeded { get; } = new ErrorCode(QuotaExceededValue); + /// Conflict. + public static ErrorCode Conflict { get; } = new ErrorCode(ConflictValue); + /// Warning. + public static ErrorCode Warning { get; } = new ErrorCode(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(ErrorCode left, ErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ErrorCode left, ErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ErrorCode(string value) => new ErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ErrorCode other && Equals(other); + /// + public bool Equals(ErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs new file mode 100644 index 000000000000..f136f882d5bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EvaluationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + if (Optional.IsDefined(TrainingSplitPercentage)) + { + writer.WritePropertyName("trainingSplitPercentage"u8); + writer.WriteNumberValue(TrainingSplitPercentage.Value); + } + if (Optional.IsDefined(TestingSplitPercentage)) + { + writer.WritePropertyName("testingSplitPercentage"u8); + writer.WriteNumberValue(TestingSplitPercentage.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationDetails(document.RootElement, options); + } + + internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationKind? kind = default; + int? trainingSplitPercentage = default; + int? testingSplitPercentage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new EvaluationKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("testingSplitPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testingSplitPercentage = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationDetails(kind, trainingSplitPercentage, testingSplitPercentage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support writing '{options.Format}' format."); + } + } + + EvaluationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.cs new file mode 100644 index 000000000000..1fc4598f9317 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationDetails.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options used running the evaluation. + public partial class EvaluationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EvaluationDetails() + { + } + + /// Initializes a new instance of . + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationDetails(EvaluationKind? kind, int? trainingSplitPercentage, int? testingSplitPercentage, IDictionary serializedAdditionalRawData) + { + Kind = kind; + TrainingSplitPercentage = trainingSplitPercentage; + TestingSplitPercentage = testingSplitPercentage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. + public EvaluationKind? Kind { get; set; } + /// Represents the training dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TrainingSplitPercentage { get; set; } + /// Represents the testing dataset split percentage. Only needed in case the evaluation kind is percentage. + public int? TestingSplitPercentage { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs new file mode 100644 index 000000000000..8a079924352a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EvaluationJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + + internal static EvaluationJobResult DeserializeEvaluationJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluationDetails evaluationOptions = default; + string modelLabel = default; + string trainingConfigVersion = default; + int percentComplete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.cs new file mode 100644 index 000000000000..787dbacb2620 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobResult.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The EvaluationJobResult. + public partial class EvaluationJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// , or is null. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + } + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// Represents trained model label. + /// Represents training config version. + /// Represents progress percentage. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobResult(EvaluationDetails evaluationOptions, string modelLabel, string trainingConfigVersion, int percentComplete, IDictionary serializedAdditionalRawData) + { + EvaluationOptions = evaluationOptions; + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + PercentComplete = percentComplete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobResult() + { + } + + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents progress percentage. + public int PercentComplete { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs new file mode 100644 index 000000000000..4218bfdf7891 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class EvaluationJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationJobState(document.RootElement, options); + } + + internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + EvaluationJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = EvaluationJobResult.DeserializeEvaluationJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EvaluationJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support writing '{options.Format}' format."); + } + } + + EvaluationJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.cs new file mode 100644 index 000000000000..acecb242d3f9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationJobState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a evaluation job. + public partial class EvaluationJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents evaluation task detailed result. + /// is null. + internal EvaluationJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, EvaluationJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents evaluation task detailed result. + /// Keeps track of any properties unknown to the library. + internal EvaluationJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, EvaluationJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents evaluation task detailed result. + public EvaluationJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.cs new file mode 100644 index 000000000000..6cd9bbab3779 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationKind.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.Language.Text.Authoring.Models +{ + /// The EvaluationKind. + public readonly partial struct EvaluationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PercentageValue = "percentage"; + private const string ManualValue = "manual"; + + /// Split the data into training and test sets according to user-defined percentages. + public static EvaluationKind Percentage { get; } = new EvaluationKind(PercentageValue); + /// Split the data according to the chosen dataset for every example in the data. + public static EvaluationKind Manual { get; } = new EvaluationKind(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationKind left, EvaluationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationKind left, EvaluationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EvaluationKind(string value) => new EvaluationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationKind other && Equals(other); + /// + public bool Equals(EvaluationKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..56dcc54bebb9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownEvaluationSummary))] + public partial class EvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationSummary(document.RootElement, options); + } + + internal static EvaluationSummary DeserializeEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomEntityRecognition": return CustomEntityRecognitionEvaluationSummary.DeserializeCustomEntityRecognitionEvaluationSummary(element, options); + case "CustomHealthcare": return CustomHealthcareEvaluationSummary.DeserializeCustomHealthcareEvaluationSummary(element, options); + case "CustomMultiLabelClassification": return CustomMultiLabelClassificationEvaluationSummary.DeserializeCustomMultiLabelClassificationEvaluationSummary(element, options); + case "CustomSingleLabelClassification": return CustomSingleLabelClassificationEvaluationSummary.DeserializeCustomSingleLabelClassificationEvaluationSummary(element, options); + case "CustomTextSentiment": return CustomTextSentimentEvaluationSummary.DeserializeCustomTextSentimentEvaluationSummary(element, options); + } + } + return UnknownEvaluationSummary.DeserializeUnknownEvaluationSummary(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.cs new file mode 100644 index 000000000000..864f4d85893c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/EvaluationSummary.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// + /// Represents the summary for an evaluation operation. + /// 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 EvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the options used running the evaluation. + /// is null. + protected EvaluationSummary(EvaluationDetails evaluationOptions) + { + Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + + EvaluationOptions = evaluationOptions; + } + + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + internal EvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + EvaluationOptions = evaluationOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EvaluationSummary() + { + } + + /// Represents the project type that the evaluation ran on. + internal ProjectKind ProjectKind { get; set; } + /// Represents the options used running the evaluation. + public EvaluationDetails EvaluationOptions { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..e730c672af60 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ResultUrl)) + { + writer.WritePropertyName("resultUrl"u8); + writer.WriteStringValue(ResultUrl); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportProjectJobState(document.RootElement, options); + } + + internal static ExportProjectJobState DeserializeExportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + string resultUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("resultUrl"u8)) + { + resultUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + resultUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.cs new file mode 100644 index 000000000000..9850d7221eab --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportProjectJobState.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an export job. + public partial class ExportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// The URL to use in order to download the exported project. + /// Keeps track of any properties unknown to the library. + internal ExportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, string resultUrl, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + ResultUrl = resultUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// The URL to use in order to download the exported project. + public string ResultUrl { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs new file mode 100644 index 000000000000..ad6193bfa96d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedClass : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedClass)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedClass IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedClass)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedClass(document.RootElement, options); + } + + internal static ExportedClass DeserializeExportedClass(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedClass(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedClass)} does not support writing '{options.Format}' format."); + } + } + + ExportedClass IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedClass(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedClass)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedClass FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedClass(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.cs new file mode 100644 index 000000000000..8e5ad37b09df --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedClass.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a class of an exported project. + public partial class ExportedClass + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedClass() + { + } + + /// Initializes a new instance of . + /// The class category. + /// Keeps track of any properties unknown to the library. + internal ExportedClass(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The class category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs new file mode 100644 index 000000000000..5e806b73d13a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCompositeEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CompositionSetting)) + { + writer.WritePropertyName("compositionSetting"u8); + writer.WriteStringValue(CompositionSetting.Value.ToString()); + } + if (Optional.IsDefined(List)) + { + writer.WritePropertyName("list"u8); + writer.WriteObjectValue(List, options); + } + if (Optional.IsCollectionDefined(Prebuilts)) + { + writer.WritePropertyName("prebuilts"u8); + writer.WriteStartArray(); + foreach (var item in Prebuilts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCompositeEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCompositeEntity(document.RootElement, options); + } + + internal static ExportedCompositeEntity DeserializeExportedCompositeEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CompositionSetting? compositionSetting = default; + ExportedEntityList list = default; + IList prebuilts = default; + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("compositionSetting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + compositionSetting = new CompositionSetting(property.Value.GetString()); + continue; + } + if (property.NameEquals("list"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + list = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); + continue; + } + if (property.NameEquals("prebuilts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedPrebuiltEntity.DeserializeExportedPrebuiltEntity(item, options)); + } + prebuilts = array; + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCompositeEntity(compositionSetting, list, prebuilts ?? new ChangeTrackingList(), category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedCompositeEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCompositeEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCompositeEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCompositeEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCompositeEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.cs new file mode 100644 index 000000000000..d48e0060c13c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCompositeEntity.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an entity in an exported project with composite entities enabled. + public partial class ExportedCompositeEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCompositeEntity() + { + Prebuilts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The behavior to follow when the entity's components overlap with each other. + /// The list component of the entity. + /// The prebuilt entities components. + /// The entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedCompositeEntity(CompositionSetting? compositionSetting, ExportedEntityList list, IList prebuilts, string category, IDictionary serializedAdditionalRawData) + { + CompositionSetting = compositionSetting; + List = list; + Prebuilts = prebuilts; + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The behavior to follow when the entity's components overlap with each other. + public CompositionSetting? CompositionSetting { get; set; } + /// The list component of the entity. + public ExportedEntityList List { get; set; } + /// The prebuilt entities components. + public IList Prebuilts { get; } + /// The entity category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs new file mode 100644 index 000000000000..02b4790e7d13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomAbstractiveSummarizationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("summaryLocation"u8); + writer.WriteStringValue(SummaryLocation); + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomAbstractiveSummarizationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomAbstractiveSummarizationDocument(document.RootElement, options); + } + + internal static ExportedCustomAbstractiveSummarizationDocument DeserializeExportedCustomAbstractiveSummarizationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string summaryLocation = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("summaryLocation"u8)) + { + summaryLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomAbstractiveSummarizationDocument(summaryLocation, location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomAbstractiveSummarizationDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomAbstractiveSummarizationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomAbstractiveSummarizationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomAbstractiveSummarizationDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.cs new file mode 100644 index 000000000000..1e9bde79d55c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationDocument.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom abstractive summarization project. + public partial class ExportedCustomAbstractiveSummarizationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// is null. + public ExportedCustomAbstractiveSummarizationDocument(string summaryLocation) + { + Argument.AssertNotNull(summaryLocation, nameof(summaryLocation)); + + SummaryLocation = summaryLocation; + } + + /// Initializes a new instance of . + /// Represents the summary file location in the blob store container associated with the project. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomAbstractiveSummarizationDocument(string summaryLocation, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + SummaryLocation = summaryLocation; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedCustomAbstractiveSummarizationDocument() + { + } + + /// Represents the summary file location in the blob store container associated with the project. + public string SummaryLocation { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..8130c91d17a0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomAbstractiveSummarizationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomAbstractiveSummarizationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomAbstractiveSummarizationProjectAssets DeserializeExportedCustomAbstractiveSummarizationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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(ExportedCustomAbstractiveSummarizationDocument.DeserializeExportedCustomAbstractiveSummarizationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomAbstractiveSummarizationProjectAssets(projectKind, serializedAdditionalRawData, documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomAbstractiveSummarizationProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomAbstractiveSummarizationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomAbstractiveSummarizationProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomAbstractiveSummarizationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomAbstractiveSummarizationProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.cs new file mode 100644 index 000000000000..f6b5213b4f13 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomAbstractiveSummarizationProjectAssets.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for an abstractive summarization project. + public partial class ExportedCustomAbstractiveSummarizationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomAbstractiveSummarizationProjectAssets() + { + ProjectKind = ProjectKind.CustomAbstractiveSummarization; + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of documents belonging to this project. + internal ExportedCustomAbstractiveSummarizationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Documents = documents; + } + + /// The list of documents belonging to this project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs new file mode 100644 index 000000000000..36c3b019617b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomEntityRecognitionDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomEntityRecognitionDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomEntityRecognitionDocument(document.RootElement, options); + } + + internal static ExportedCustomEntityRecognitionDocument DeserializeExportedCustomEntityRecognitionDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityRegion.DeserializeExportedDocumentEntityRegion(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomEntityRecognitionDocument(entities ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomEntityRecognitionDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomEntityRecognitionDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomEntityRecognitionDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomEntityRecognitionDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.cs new file mode 100644 index 000000000000..457f66c0e720 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionDocument.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom entity recognition project. + public partial class ExportedCustomEntityRecognitionDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomEntityRecognitionDocument() + { + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of entity labels belonging to the document. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomEntityRecognitionDocument(IList entities, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of entity labels belonging to the document. + public IList Entities { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.Serialization.cs new file mode 100644 index 000000000000..e29002a15116 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomEntityRecognitionProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomEntityRecognitionProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomEntityRecognitionProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomEntityRecognitionProjectAssets DeserializeExportedCustomEntityRecognitionProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntity.DeserializeExportedEntity(item, options)); + } + entities = 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(ExportedCustomEntityRecognitionDocument.DeserializeExportedCustomEntityRecognitionDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomEntityRecognitionProjectAssets(projectKind, serializedAdditionalRawData, entities ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomEntityRecognitionProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomEntityRecognitionProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomEntityRecognitionProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomEntityRecognitionProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomEntityRecognitionProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs new file mode 100644 index 000000000000..15b8b18d382b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomEntityRecognitionProjectAssets.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for a entity recognition project. + public partial class ExportedCustomEntityRecognitionProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomEntityRecognitionProjectAssets() + { + ProjectKind = ProjectKind.CustomEntityRecognition; + Entities = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of entities belonging to the project. + /// The list of documents belonging to the project. + internal ExportedCustomEntityRecognitionProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList entities, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Entities = entities; + Documents = documents; + } + + /// The list of entities belonging to the project. + public IList Entities { get; } + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs new file mode 100644 index 000000000000..b0cbdac083f4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomHealthcareDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomHealthcareDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomHealthcareDocument(document.RootElement, options); + } + + internal static ExportedCustomHealthcareDocument DeserializeExportedCustomHealthcareDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityRegion.DeserializeExportedDocumentEntityRegion(item, options)); + } + entities = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomHealthcareDocument(entities ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomHealthcareDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomHealthcareDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomHealthcareDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomHealthcareDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.cs new file mode 100644 index 000000000000..6f1cd4926bc9 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareDocument.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a CustomHealthcare project. + public partial class ExportedCustomHealthcareDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomHealthcareDocument() + { + Entities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of entity labels belonging to the document. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomHealthcareDocument(IList entities, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Entities = entities; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of entity labels belonging to the document. + public IList Entities { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.Serialization.cs new file mode 100644 index 000000000000..5484989b5b82 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomHealthcareProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Entities)) + { + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomHealthcareProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomHealthcareProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomHealthcareProjectAssets DeserializeExportedCustomHealthcareProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList entities = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedCompositeEntity.DeserializeExportedCompositeEntity(item, options)); + } + entities = 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(ExportedCustomHealthcareDocument.DeserializeExportedCustomHealthcareDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomHealthcareProjectAssets(projectKind, serializedAdditionalRawData, entities ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomHealthcareProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomHealthcareProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomHealthcareProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomHealthcareProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomHealthcareProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs new file mode 100644 index 000000000000..9556e1cea497 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomHealthcareProjectAssets.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for a CustomHealthcare project. + public partial class ExportedCustomHealthcareProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomHealthcareProjectAssets() + { + ProjectKind = ProjectKind.CustomHealthcare; + Entities = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of entities belonging to the project. + /// The list of documents belonging to the project. + internal ExportedCustomHealthcareProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList entities, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Entities = entities; + Documents = documents; + } + + /// The list of entities belonging to the project. + public IList Entities { get; } + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs new file mode 100644 index 000000000000..5ce98fb56034 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomMultiLabelClassificationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomMultiLabelClassificationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomMultiLabelClassificationDocument(document.RootElement, options); + } + + internal static ExportedCustomMultiLabelClassificationDocument DeserializeExportedCustomMultiLabelClassificationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentClass.DeserializeExportedDocumentClass(item, options)); + } + classes = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomMultiLabelClassificationDocument(classes ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomMultiLabelClassificationDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomMultiLabelClassificationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomMultiLabelClassificationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomMultiLabelClassificationDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.cs new file mode 100644 index 000000000000..2664fbeadd48 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationDocument.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document of a custom multi-label classification project. + public partial class ExportedCustomMultiLabelClassificationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomMultiLabelClassificationDocument() + { + Classes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The document classes. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomMultiLabelClassificationDocument(IList classes, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Classes = classes; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The document classes. + public IList Classes { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..260364af2413 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomMultiLabelClassificationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomMultiLabelClassificationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomMultiLabelClassificationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomMultiLabelClassificationProjectAssets DeserializeExportedCustomMultiLabelClassificationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedClass.DeserializeExportedClass(item, options)); + } + classes = 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(ExportedCustomMultiLabelClassificationDocument.DeserializeExportedCustomMultiLabelClassificationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomMultiLabelClassificationProjectAssets(projectKind, serializedAdditionalRawData, classes ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomMultiLabelClassificationProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomMultiLabelClassificationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomMultiLabelClassificationProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomMultiLabelClassificationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomMultiLabelClassificationProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs new file mode 100644 index 000000000000..f7e762c59a43 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomMultiLabelClassificationProjectAssets.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for a custom multi-label classification project. + public partial class ExportedCustomMultiLabelClassificationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomMultiLabelClassificationProjectAssets() + { + ProjectKind = ProjectKind.CustomMultiLabelClassification; + Classes = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of classes in the project. + /// The list of documents in the project. + internal ExportedCustomMultiLabelClassificationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList classes, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Classes = classes; + Documents = documents; + } + + /// The list of classes in the project. + public IList Classes { get; } + /// The list of documents in the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.Serialization.cs new file mode 100644 index 000000000000..9619c92f350d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomSingleLabelClassificationDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Class)) + { + writer.WritePropertyName("class"u8); + writer.WriteObjectValue(Class, options); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomSingleLabelClassificationDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomSingleLabelClassificationDocument(document.RootElement, options); + } + + internal static ExportedCustomSingleLabelClassificationDocument DeserializeExportedCustomSingleLabelClassificationDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExportedDocumentClass @class = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("class"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @class = ExportedDocumentClass.DeserializeExportedDocumentClass(property.Value, options); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomSingleLabelClassificationDocument(@class, location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomSingleLabelClassificationDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomSingleLabelClassificationDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomSingleLabelClassificationDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomSingleLabelClassificationDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.cs new file mode 100644 index 000000000000..4e8e5bab2b58 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationDocument.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom single-label classification project. + public partial class ExportedCustomSingleLabelClassificationDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomSingleLabelClassificationDocument() + { + } + + /// Initializes a new instance of . + /// The class of the documents. + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomSingleLabelClassificationDocument(ExportedDocumentClass @class, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + Class = @class; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The class of the documents. + public ExportedDocumentClass Class { get; set; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.Serialization.cs new file mode 100644 index 000000000000..48511313fd42 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomSingleLabelClassificationProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"u8); + writer.WriteStartArray(); + foreach (var item in Classes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomSingleLabelClassificationProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomSingleLabelClassificationProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomSingleLabelClassificationProjectAssets DeserializeExportedCustomSingleLabelClassificationProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList classes = default; + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedClass.DeserializeExportedClass(item, options)); + } + classes = 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(ExportedCustomSingleLabelClassificationDocument.DeserializeExportedCustomSingleLabelClassificationDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomSingleLabelClassificationProjectAssets(projectKind, serializedAdditionalRawData, classes ?? new ChangeTrackingList(), documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomSingleLabelClassificationProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomSingleLabelClassificationProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomSingleLabelClassificationProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomSingleLabelClassificationProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomSingleLabelClassificationProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs new file mode 100644 index 000000000000..ad0da5081ab2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomSingleLabelClassificationProjectAssets.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for a single-label classification project. + public partial class ExportedCustomSingleLabelClassificationProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomSingleLabelClassificationProjectAssets() + { + ProjectKind = ProjectKind.CustomSingleLabelClassification; + Classes = new ChangeTrackingList(); + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of classes belonging to this project. + /// The list of documents belonging to this project. + internal ExportedCustomSingleLabelClassificationProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList classes, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Classes = classes; + Documents = documents; + } + + /// The list of classes belonging to this project. + public IList Classes { get; } + /// The list of documents belonging to this project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs new file mode 100644 index 000000000000..80ff9a84b432 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomTextSentimentDocument : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SentimentSpans)) + { + writer.WritePropertyName("sentimentSpans"u8); + writer.WriteStartArray(); + foreach (var item in SentimentSpans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Dataset)) + { + writer.WritePropertyName("dataset"u8); + writer.WriteStringValue(Dataset); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedCustomTextSentimentDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomTextSentimentDocument(document.RootElement, options); + } + + internal static ExportedCustomTextSentimentDocument DeserializeExportedCustomTextSentimentDocument(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sentimentSpans = default; + string location = default; + string language = default; + string dataset = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sentimentSpans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentSentimentLabel.DeserializeExportedDocumentSentimentLabel(item, options)); + } + sentimentSpans = array; + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataset"u8)) + { + dataset = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomTextSentimentDocument(sentimentSpans ?? new ChangeTrackingList(), location, language, dataset, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomTextSentimentDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomTextSentimentDocument(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentDocument)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedCustomTextSentimentDocument FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomTextSentimentDocument(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.cs new file mode 100644 index 000000000000..60ac85cb1f40 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentDocument.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported document for a custom text sentiment project. + public partial class ExportedCustomTextSentimentDocument + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedCustomTextSentimentDocument() + { + SentimentSpans = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The location of the document in the storage. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + /// Keeps track of any properties unknown to the library. + internal ExportedCustomTextSentimentDocument(IList sentimentSpans, string location, string language, string dataset, IDictionary serializedAdditionalRawData) + { + SentimentSpans = sentimentSpans; + Location = location; + Language = language; + Dataset = dataset; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the sentiment spans. + public IList SentimentSpans { get; } + /// The location of the document in the storage. + public string Location { get; set; } + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The dataset for this document. Allowed values are 'Train' and 'Test'. + public string Dataset { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.Serialization.cs new file mode 100644 index 000000000000..29705c0072cb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedCustomTextSentimentProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + ExportedCustomTextSentimentProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedCustomTextSentimentProjectAssets(document.RootElement, options); + } + + internal static ExportedCustomTextSentimentProjectAssets DeserializeExportedCustomTextSentimentProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + ProjectKind projectKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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(ExportedCustomTextSentimentDocument.DeserializeExportedCustomTextSentimentDocument(item, options)); + } + documents = array; + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedCustomTextSentimentProjectAssets(projectKind, serializedAdditionalRawData, documents ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedCustomTextSentimentProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedCustomTextSentimentProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedCustomTextSentimentProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ExportedCustomTextSentimentProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedCustomTextSentimentProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.cs new file mode 100644 index 000000000000..212043139c9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedCustomTextSentimentProjectAssets.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the exported assets for a custom text sentiment project. + public partial class ExportedCustomTextSentimentProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + public ExportedCustomTextSentimentProjectAssets() + { + ProjectKind = ProjectKind.CustomTextSentiment; + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The list of documents belonging to the project. + internal ExportedCustomTextSentimentProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData, IList documents) : base(projectKind, serializedAdditionalRawData) + { + Documents = documents; + } + + /// The list of documents belonging to the project. + public IList Documents { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.Serialization.cs new file mode 100644 index 000000000000..7478efb3a6d3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedDocumentClass : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedDocumentClass IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentClass(document.RootElement, options); + } + + internal static ExportedDocumentClass DeserializeExportedDocumentClass(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentClass(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentClass IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedDocumentClass(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentClass)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedDocumentClass FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentClass(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.cs new file mode 100644 index 000000000000..f50670ddc89b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentClass.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a classification label for a document. + public partial class ExportedDocumentClass + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentClass() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentClass(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the category. + public string Category { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs new file mode 100644 index 000000000000..dc87c9d52c1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedDocumentEntityLabel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Offset)) + { + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedDocumentEntityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentEntityLabel(document.RootElement, options); + } + + internal static ExportedDocumentEntityLabel DeserializeExportedDocumentEntityLabel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + int? offset = default; + int? length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentEntityLabel(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentEntityLabel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedDocumentEntityLabel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityLabel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedDocumentEntityLabel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentEntityLabel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.cs new file mode 100644 index 000000000000..5dafa09970d4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityLabel.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an entity label for a document. + public partial class ExportedDocumentEntityLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentEntityLabel() + { + } + + /// Initializes a new instance of . + /// The entity category. + /// Start position for the entity text. + /// Length for the entity text. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentEntityLabel(string category, int? offset, int? length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity category. + public string Category { get; set; } + /// Start position for the entity text. + public int? Offset { get; set; } + /// Length for the entity text. + public int? Length { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs new file mode 100644 index 000000000000..5eb70951a1dd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedDocumentEntityRegion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegionOffset)) + { + writer.WritePropertyName("regionOffset"u8); + writer.WriteNumberValue(RegionOffset.Value); + } + if (Optional.IsDefined(RegionLength)) + { + writer.WritePropertyName("regionLength"u8); + writer.WriteNumberValue(RegionLength.Value); + } + if (Optional.IsCollectionDefined(Labels)) + { + writer.WritePropertyName("labels"u8); + writer.WriteStartArray(); + foreach (var item in Labels) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedDocumentEntityRegion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentEntityRegion(document.RootElement, options); + } + + internal static ExportedDocumentEntityRegion DeserializeExportedDocumentEntityRegion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? regionOffset = default; + int? regionLength = default; + IList labels = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("regionOffset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionOffset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("regionLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionLength = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("labels"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedDocumentEntityLabel.DeserializeExportedDocumentEntityLabel(item, options)); + } + labels = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentEntityRegion(regionOffset, regionLength, labels ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentEntityRegion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedDocumentEntityRegion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentEntityRegion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedDocumentEntityRegion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentEntityRegion(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.cs new file mode 100644 index 000000000000..ef1f229211c8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentEntityRegion.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a region in a document for entity labeling. + public partial class ExportedDocumentEntityRegion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentEntityRegion() + { + Labels = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Start position for the region. + /// Length for the region text. + /// The list of entity labels belonging to this region. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentEntityRegion(int? regionOffset, int? regionLength, IList labels, IDictionary serializedAdditionalRawData) + { + RegionOffset = regionOffset; + RegionLength = regionLength; + Labels = labels; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Start position for the region. + public int? RegionOffset { get; set; } + /// Length for the region text. + public int? RegionLength { get; set; } + /// The list of entity labels belonging to this region. + public IList Labels { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs new file mode 100644 index 000000000000..f0f2a616ac1c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedDocumentSentimentLabel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Offset)) + { + writer.WritePropertyName("offset"u8); + writer.WriteNumberValue(Offset.Value); + } + if (Optional.IsDefined(Length)) + { + writer.WritePropertyName("length"u8); + writer.WriteNumberValue(Length.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedDocumentSentimentLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedDocumentSentimentLabel(document.RootElement, options); + } + + internal static ExportedDocumentSentimentLabel DeserializeExportedDocumentSentimentLabel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextAnalysisAuthoringSentiment? category = default; + int? offset = default; + int? length = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + category = new TextAnalysisAuthoringSentiment(property.Value.GetString()); + continue; + } + if (property.NameEquals("offset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + length = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedDocumentSentimentLabel(category, offset, length, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support writing '{options.Format}' format."); + } + } + + ExportedDocumentSentimentLabel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedDocumentSentimentLabel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedDocumentSentimentLabel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedDocumentSentimentLabel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedDocumentSentimentLabel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.cs new file mode 100644 index 000000000000..dc1adbc74a16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedDocumentSentimentLabel.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an entity label for a document. + public partial class ExportedDocumentSentimentLabel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedDocumentSentimentLabel() + { + } + + /// Initializes a new instance of . + /// The sentiment category. + /// Start position for the sentiment text. + /// Length for the sentiment text. + /// Keeps track of any properties unknown to the library. + internal ExportedDocumentSentimentLabel(TextAnalysisAuthoringSentiment? category, int? offset, int? length, IDictionary serializedAdditionalRawData) + { + Category = category; + Offset = offset; + Length = length; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sentiment category. + public TextAnalysisAuthoringSentiment? Category { get; set; } + /// Start position for the sentiment text. + public int? Offset { get; set; } + /// Length for the sentiment text. + public int? Length { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs new file mode 100644 index 000000000000..c5c6edab6ac1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntity(document.RootElement, options); + } + + internal static ExportedEntity DeserializeExportedEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntity(category, description, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.cs new file mode 100644 index 000000000000..0d94bdbb9599 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntity.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an entity in an exported project. + public partial class ExportedEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntity() + { + } + + /// Initializes a new instance of . + /// The entity category. + /// Short description for entity category. Required when enabling synthetic data generation. + /// Keeps track of any properties unknown to the library. + internal ExportedEntity(string category, string description, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity category. + public string Category { get; set; } + /// Short description for entity category. Required when enabling synthetic data generation. + public string Description { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs new file mode 100644 index 000000000000..d531ecfb0b80 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntityList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Sublists)) + { + writer.WritePropertyName("sublists"u8); + writer.WriteStartArray(); + foreach (var item in Sublists) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityList(document.RootElement, options); + } + + internal static ExportedEntityList DeserializeExportedEntityList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sublists = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sublists"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntitySublist.DeserializeExportedEntitySublist(item, options)); + } + sublists = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityList(sublists ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityList FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityList(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.cs new file mode 100644 index 000000000000..649912622cfe --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityList.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a list component of an entity. + public partial class ExportedEntityList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityList() + { + Sublists = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The sub-lists of the list component. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityList(IList sublists, IDictionary serializedAdditionalRawData) + { + Sublists = sublists; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The sub-lists of the list component. + public IList Sublists { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs new file mode 100644 index 000000000000..4972bb71997d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntityListSynonym : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntityListSynonym IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + + internal static ExportedEntityListSynonym DeserializeExportedEntityListSynonym(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string language = default; + IList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntityListSynonym(language, values ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntityListSynonym IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntityListSynonym(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntityListSynonym)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntityListSynonym FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntityListSynonym(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs new file mode 100644 index 000000000000..d2ce805ef39d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntityListSynonym.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a list of synonyms inside a list component. + public partial class ExportedEntityListSynonym + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntityListSynonym() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// The list of synonyms. + /// Keeps track of any properties unknown to the library. + internal ExportedEntityListSynonym(string language, IList values, IDictionary serializedAdditionalRawData) + { + Language = language; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents the language of the synonyms. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; set; } + /// The list of synonyms. + public IList Values { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs new file mode 100644 index 000000000000..a0785f2249bb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedEntitySublist : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ListKey)) + { + writer.WritePropertyName("listKey"u8); + writer.WriteStringValue(ListKey); + } + if (Optional.IsCollectionDefined(Synonyms)) + { + writer.WritePropertyName("synonyms"u8); + writer.WriteStartArray(); + foreach (var item in Synonyms) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedEntitySublist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + + internal static ExportedEntitySublist DeserializeExportedEntitySublist(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string listKey = default; + IList synonyms = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("listKey"u8)) + { + listKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("synonyms"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExportedEntityListSynonym.DeserializeExportedEntityListSynonym(item, options)); + } + synonyms = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedEntitySublist(listKey, synonyms ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support writing '{options.Format}' format."); + } + } + + ExportedEntitySublist IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedEntitySublist(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedEntitySublist)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedEntitySublist FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedEntitySublist(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.cs new file mode 100644 index 000000000000..5ae507815c1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedEntitySublist.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a sub-list inside a list component. + public partial class ExportedEntitySublist + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExportedEntitySublist() + { + Synonyms = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The key of the sub-list. + /// The phrases of that correspond to the sub-list. + /// Keeps track of any properties unknown to the library. + internal ExportedEntitySublist(string listKey, IList synonyms, IDictionary serializedAdditionalRawData) + { + ListKey = listKey; + Synonyms = synonyms; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key of the sub-list. + public string ListKey { get; set; } + /// The phrases of that correspond to the sub-list. + public IList Synonyms { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs new file mode 100644 index 000000000000..762001abd73f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedModelDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trainedModelLabel"u8); + writer.WriteStringValue(TrainedModelLabel); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedModelDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelDetails(document.RootElement, options); + } + + internal static ExportedModelDetails DeserializeExportedModelDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainedModelLabel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainedModelLabel"u8)) + { + trainedModelLabel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelDetails(trainedModelLabel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedModelDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedModelDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.cs new file mode 100644 index 000000000000..80920bc366c0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for creating or replacing an exported model. + public partial class ExportedModelDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The trained model label. + /// is null. + public ExportedModelDetails(string trainedModelLabel) + { + Argument.AssertNotNull(trainedModelLabel, nameof(trainedModelLabel)); + + TrainedModelLabel = trainedModelLabel; + } + + /// Initializes a new instance of . + /// The trained model label. + /// Keeps track of any properties unknown to the library. + internal ExportedModelDetails(string trainedModelLabel, IDictionary serializedAdditionalRawData) + { + TrainedModelLabel = trainedModelLabel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelDetails() + { + } + + /// The trained model label. + public string TrainedModelLabel { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs new file mode 100644 index 000000000000..400ffa3c059b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedModelJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedModelJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelJobState(document.RootElement, options); + } + + internal static ExportedModelJobState DeserializeExportedModelJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedModelJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedModelJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.cs new file mode 100644 index 000000000000..2ab5ed9075b6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a job to create or updated an exported model. + public partial class ExportedModelJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ExportedModelJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ExportedModelJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs new file mode 100644 index 000000000000..b37e81e6521d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedModelManifest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelFiles"u8); + writer.WriteStartArray(); + foreach (var item in ModelFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedModelManifest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedModelManifest(document.RootElement, options); + } + + internal static ExportedModelManifest DeserializeExportedModelManifest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList modelFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelFiles"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelFile.DeserializeModelFile(item, options)); + } + modelFiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedModelManifest(modelFiles, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support writing '{options.Format}' format."); + } + } + + ExportedModelManifest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedModelManifest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedModelManifest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedModelManifest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedModelManifest(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.cs new file mode 100644 index 000000000000..bf9a347bff15 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedModelManifest.cs @@ -0,0 +1,76 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the properties for the exported model manifest. + public partial class ExportedModelManifest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// is null. + internal ExportedModelManifest(IEnumerable modelFiles) + { + Argument.AssertNotNull(modelFiles, nameof(modelFiles)); + + ModelFiles = modelFiles.ToList(); + } + + /// Initializes a new instance of . + /// The model files belonging to this model. + /// Keeps track of any properties unknown to the library. + internal ExportedModelManifest(IReadOnlyList modelFiles, IDictionary serializedAdditionalRawData) + { + ModelFiles = modelFiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedModelManifest() + { + } + + /// The model files belonging to this model. + public IReadOnlyList ModelFiles { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..c2b8b8cc290c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedPrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedPrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + + internal static ExportedPrebuiltEntity DeserializeExportedPrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedPrebuiltEntity(category, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + ExportedPrebuiltEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedPrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedPrebuiltEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedPrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedPrebuiltEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs new file mode 100644 index 000000000000..c758f0fed070 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedPrebuiltEntity.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported prebuilt entity component. + public partial class ExportedPrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// is null. + public ExportedPrebuiltEntity(string category) + { + Argument.AssertNotNull(category, nameof(category)); + + Category = category; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// Keeps track of any properties unknown to the library. + internal ExportedPrebuiltEntity(string category, IDictionary serializedAdditionalRawData) + { + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedPrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.Serialization.cs new file mode 100644 index 000000000000..46e531b43506 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedProject : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectFileVersion"u8); + writer.WriteStringValue(ProjectFileVersion); + writer.WritePropertyName("stringIndexType"u8); + writer.WriteStringValue(StringIndexType.ToString()); + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + if (Optional.IsDefined(Assets)) + { + writer.WritePropertyName("assets"u8); + writer.WriteObjectValue(Assets, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProject(document.RootElement, options); + } + + internal static ExportedProject DeserializeExportedProject(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectFileVersion = default; + StringIndexType stringIndexType = default; + CreateProjectDetails metadata = default; + ExportedProjectAssets assets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectFileVersion"u8)) + { + projectFileVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("stringIndexType"u8)) + { + stringIndexType = new StringIndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + metadata = CreateProjectDetails.DeserializeCreateProjectDetails(property.Value, options); + continue; + } + if (property.NameEquals("assets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assets = ExportedProjectAssets.DeserializeExportedProjectAssets(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support writing '{options.Format}' format."); + } + } + + ExportedProject IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProject(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProject)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedProject FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProject(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.cs new file mode 100644 index 000000000000..ef3a9a5db83b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProject.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported project. + public partial class ExportedProject + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// or is null. + public ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata) + { + Argument.AssertNotNull(projectFileVersion, nameof(projectFileVersion)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + } + + /// Initializes a new instance of . + /// The version of the exported file. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Represents the project metadata. + /// + /// Represents the project assets. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata, ExportedProjectAssets assets, IDictionary serializedAdditionalRawData) + { + ProjectFileVersion = projectFileVersion; + StringIndexType = stringIndexType; + Metadata = metadata; + Assets = assets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedProject() + { + } + + /// The version of the exported file. + public string ProjectFileVersion { get; } + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + public StringIndexType StringIndexType { get; } + /// Represents the project metadata. + public CreateProjectDetails Metadata { get; } + /// + /// Represents the project assets. + /// 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 ExportedProjectAssets Assets { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..19f14783dbb1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + [PersistableModelProxy(typeof(UnknownExportedProjectAssets))] + public partial class ExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("projectKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CustomAbstractiveSummarization": return ExportedCustomAbstractiveSummarizationProjectAssets.DeserializeExportedCustomAbstractiveSummarizationProjectAssets(element, options); + case "CustomEntityRecognition": return ExportedCustomEntityRecognitionProjectAssets.DeserializeExportedCustomEntityRecognitionProjectAssets(element, options); + case "CustomHealthcare": return ExportedCustomHealthcareProjectAssets.DeserializeExportedCustomHealthcareProjectAssets(element, options); + case "CustomMultiLabelClassification": return ExportedCustomMultiLabelClassificationProjectAssets.DeserializeExportedCustomMultiLabelClassificationProjectAssets(element, options); + case "CustomSingleLabelClassification": return ExportedCustomSingleLabelClassificationProjectAssets.DeserializeExportedCustomSingleLabelClassificationProjectAssets(element, options); + case "CustomTextSentiment": return ExportedCustomTextSentimentProjectAssets.DeserializeExportedCustomTextSentimentProjectAssets(element, options); + } + } + return UnknownExportedProjectAssets.DeserializeUnknownExportedProjectAssets(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.cs new file mode 100644 index 000000000000..0130e7c0af22 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedProjectAssets.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// + /// Represents the assets of an exported project. + /// 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 ExportedProjectAssets + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ExportedProjectAssets() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal ExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) + { + ProjectKind = projectKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the project kind. + internal ProjectKind ProjectKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs new file mode 100644 index 000000000000..abeb02983451 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ExportedTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("exportedModelName"u8); + writer.WriteStringValue(ExportedModelName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastExportedModelDateTime"u8); + writer.WriteStringValue(LastExportedModelDateTime, "O"); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExportedTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + + internal static ExportedTrainedModel DeserializeExportedTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string exportedModelName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastExportedModelDateTime = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportedModelName"u8)) + { + exportedModelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastExportedModelDateTime"u8)) + { + lastExportedModelDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedDateTime, + lastExportedModelDateTime, + modelExpirationDate, + modelTrainingConfigVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ExportedTrainedModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedTrainedModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExportedTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExportedTrainedModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.cs new file mode 100644 index 000000000000..ab451db6dc17 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ExportedTrainedModel.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents an exported trained model. + public partial class ExportedTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// or is null. + internal ExportedTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + } + + /// Initializes a new instance of . + /// The exported model name. + /// The model ID. + /// The last trained date time of the model. + /// The last exported date time of the model. + /// The model expiration date. + /// The model training config version. + /// Keeps track of any properties unknown to the library. + internal ExportedTrainedModel(string exportedModelName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastExportedModelDateTime, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, IDictionary serializedAdditionalRawData) + { + ExportedModelName = exportedModelName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastExportedModelDateTime = lastExportedModelDateTime; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExportedTrainedModel() + { + } + + /// The exported model name. + public string ExportedModelName { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The last exported date time of the model. + public DateTimeOffset LastExportedModelDateTime { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs new file mode 100644 index 000000000000..75db8690ed14 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ImportProjectJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImportProjectJobState(document.RootElement, options); + } + + internal static ImportProjectJobState DeserializeImportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImportProjectJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support writing '{options.Format}' format."); + } + } + + ImportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImportProjectJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImportProjectJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImportProjectJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.cs new file mode 100644 index 000000000000..11931f72bd16 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ImportProjectJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of an import job. + public partial class ImportProjectJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ImportProjectJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ImportProjectJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ImportProjectJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorCode.cs new file mode 100644 index 000000000000..0dbec264065a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorCode.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.Language.Text.Authoring.Models +{ + /// Human-readable error code. + public readonly partial struct InnerErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InnerErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidRequestValue = "InvalidRequest"; + private const string InvalidParameterValueValue = "InvalidParameterValue"; + private const string KnowledgeBaseNotFoundValue = "KnowledgeBaseNotFound"; + private const string AzureCognitiveSearchNotFoundValue = "AzureCognitiveSearchNotFound"; + private const string AzureCognitiveSearchThrottlingValue = "AzureCognitiveSearchThrottling"; + private const string ExtractionFailureValue = "ExtractionFailure"; + private const string InvalidRequestBodyFormatValue = "InvalidRequestBodyFormat"; + private const string EmptyRequestValue = "EmptyRequest"; + private const string MissingInputDocumentsValue = "MissingInputDocuments"; + private const string InvalidDocumentValue = "InvalidDocument"; + private const string ModelVersionIncorrectValue = "ModelVersionIncorrect"; + private const string InvalidDocumentBatchValue = "InvalidDocumentBatch"; + private const string UnsupportedLanguageCodeValue = "UnsupportedLanguageCode"; + private const string InvalidCountryHintValue = "InvalidCountryHint"; + + /// InvalidRequest. + public static InnerErrorCode InvalidRequest { get; } = new InnerErrorCode(InvalidRequestValue); + /// InvalidParameterValue. + public static InnerErrorCode InvalidParameterValue { get; } = new InnerErrorCode(InvalidParameterValueValue); + /// KnowledgeBaseNotFound. + public static InnerErrorCode KnowledgeBaseNotFound { get; } = new InnerErrorCode(KnowledgeBaseNotFoundValue); + /// AzureCognitiveSearchNotFound. + public static InnerErrorCode AzureCognitiveSearchNotFound { get; } = new InnerErrorCode(AzureCognitiveSearchNotFoundValue); + /// AzureCognitiveSearchThrottling. + public static InnerErrorCode AzureCognitiveSearchThrottling { get; } = new InnerErrorCode(AzureCognitiveSearchThrottlingValue); + /// ExtractionFailure. + public static InnerErrorCode ExtractionFailure { get; } = new InnerErrorCode(ExtractionFailureValue); + /// InvalidRequestBodyFormat. + public static InnerErrorCode InvalidRequestBodyFormat { get; } = new InnerErrorCode(InvalidRequestBodyFormatValue); + /// EmptyRequest. + public static InnerErrorCode EmptyRequest { get; } = new InnerErrorCode(EmptyRequestValue); + /// MissingInputDocuments. + public static InnerErrorCode MissingInputDocuments { get; } = new InnerErrorCode(MissingInputDocumentsValue); + /// InvalidDocument. + public static InnerErrorCode InvalidDocument { get; } = new InnerErrorCode(InvalidDocumentValue); + /// ModelVersionIncorrect. + public static InnerErrorCode ModelVersionIncorrect { get; } = new InnerErrorCode(ModelVersionIncorrectValue); + /// InvalidDocumentBatch. + public static InnerErrorCode InvalidDocumentBatch { get; } = new InnerErrorCode(InvalidDocumentBatchValue); + /// UnsupportedLanguageCode. + public static InnerErrorCode UnsupportedLanguageCode { get; } = new InnerErrorCode(UnsupportedLanguageCodeValue); + /// InvalidCountryHint. + public static InnerErrorCode InvalidCountryHint { get; } = new InnerErrorCode(InvalidCountryHintValue); + /// Determines if two values are the same. + public static bool operator ==(InnerErrorCode left, InnerErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InnerErrorCode left, InnerErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InnerErrorCode(string value) => new InnerErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InnerErrorCode other && Equals(other); + /// + public bool Equals(InnerErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs new file mode 100644 index 000000000000..f461bad119e7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartObject(); + foreach (var item in Details) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Innererror)) + { + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInnerErrorModel(document.RootElement, options); + } + + internal static InnerErrorModel DeserializeInnerErrorModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InnerErrorCode code = default; + string message = default; + IReadOnlyDictionary details = default; + string target = default; + InnerErrorModel innererror = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new InnerErrorCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"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()); + } + details = dictionary; + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InnerErrorModel( + code, + message, + details ?? new ChangeTrackingDictionary(), + target, + innererror, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{options.Format}' format."); + } + } + + InnerErrorModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInnerErrorModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InnerErrorModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InnerErrorModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInnerErrorModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.cs new file mode 100644 index 000000000000..8a526e0a0df3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/InnerErrorModel.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + public partial class InnerErrorModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// is null. + internal InnerErrorModel(InnerErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// Error message. + /// Error details. + /// Error target. + /// An object containing more specific information than the current object about the error. + /// Keeps track of any properties unknown to the library. + internal InnerErrorModel(InnerErrorCode code, string message, IReadOnlyDictionary details, string target, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + Target = target; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InnerErrorModel() + { + } + + /// One of a server-defined set of error codes. + public InnerErrorCode Code { get; } + /// Error message. + public string Message { get; } + /// Error details. + public IReadOnlyDictionary Details { get; } + /// Error target. + public string Target { get; } + /// An object containing more specific information than the current object about the error. + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/JobStatus.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..7bf195744b62 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/JobStatus.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.Language.Text.Authoring.Models +{ + /// The JobStatus. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "notStarted"; + private const string RunningValue = "running"; + private const string SucceededValue = "succeeded"; + private const string FailedValue = "failed"; + private const string CancelledValue = "cancelled"; + private const string CancellingValue = "cancelling"; + private const string PartiallyCompletedValue = "partiallyCompleted"; + + /// notStarted. + public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); + /// running. + public static JobStatus Running { get; } = new JobStatus(RunningValue); + /// succeeded. + public static JobStatus Succeeded { get; } = new JobStatus(SucceededValue); + /// failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + /// cancelled. + public static JobStatus Cancelled { get; } = new JobStatus(CancelledValue); + /// cancelling. + public static JobStatus Cancelling { get; } = new JobStatus(CancellingValue); + /// partiallyCompleted. + public static JobStatus PartiallyCompleted { get; } = new JobStatus(PartiallyCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + /// + public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs new file mode 100644 index 000000000000..feb11863a23d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class LoadSnapshotJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadSnapshotJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + + internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadSnapshotJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support writing '{options.Format}' format."); + } + } + + LoadSnapshotJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLoadSnapshotJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LoadSnapshotJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLoadSnapshotJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.cs new file mode 100644 index 000000000000..09150def111c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/LoadSnapshotJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of loading a snapshot job. + public partial class LoadSnapshotJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal LoadSnapshotJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal LoadSnapshotJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal LoadSnapshotJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.Serialization.cs new file mode 100644 index 000000000000..c5ec6b2375a6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ModelFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelFile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("contentUri"u8); + writer.WriteStringValue(ContentUri.AbsoluteUri); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ModelFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeModelFile(document.RootElement, options); + } + + internal static ModelFile DeserializeModelFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Uri contentUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentUri"u8)) + { + contentUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ModelFile(name, contentUri, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ModelFile)} does not support writing '{options.Format}' format."); + } + } + + ModelFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeModelFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ModelFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ModelFile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeModelFile(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.cs new file mode 100644 index 000000000000..d12ae751d402 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ModelFile.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the properties for the model file. + public partial class ModelFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// or is null. + internal ModelFile(string name, Uri contentUri) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(contentUri, nameof(contentUri)); + + Name = name; + ContentUri = contentUri; + } + + /// Initializes a new instance of . + /// The name of the file. + /// The URI to retrieve the content of the file. + /// Keeps track of any properties unknown to the library. + internal ModelFile(string name, Uri contentUri, IDictionary serializedAdditionalRawData) + { + Name = name; + ContentUri = contentUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ModelFile() + { + } + + /// The name of the file. + public string Name { get; } + /// The URI to retrieve the content of the file. + public Uri ContentUri { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..1de24d4adc2f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class MultiLabelClassEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MultiLabelClassEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLabelClassEvaluationSummary(document.RootElement, options); + } + + internal static MultiLabelClassEvaluationSummary DeserializeMultiLabelClassEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + MultiLabelClassEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMultiLabelClassEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLabelClassEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MultiLabelClassEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLabelClassEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs new file mode 100644 index 000000000000..f7e281221ba1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary of a class in a multi-label classification project. + public partial class MultiLabelClassEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal MultiLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal MultiLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiLabelClassEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..14ba7f8385b3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class MultiLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("classes"u8); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MultiLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static MultiLabelClassificationEvaluationSummary DeserializeMultiLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary classes = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("classes"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MultiLabelClassEvaluationSummary.DeserializeMultiLabelClassEvaluationSummary(property0.Value, options)); + } + classes = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiLabelClassificationEvaluationSummary( + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + MultiLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMultiLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiLabelClassificationEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MultiLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiLabelClassificationEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..b0c0a54ed86f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/MultiLabelClassificationEvaluationSummary.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a multi-label classification project. + public partial class MultiLabelClassificationEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// is null. + internal MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(classes, nameof(classes)); + + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal MultiLabelClassificationEvaluationSummary(IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiLabelClassificationEvaluationSummary() + { + } + + /// Represents the classes evaluation. + public IReadOnlyDictionary Classes { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs new file mode 100644 index 000000000000..d10a139fae67 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class PrebuiltEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("examples"u8); + writer.WriteStringValue(Examples); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrebuiltEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrebuiltEntity(document.RootElement, options); + } + + internal static PrebuiltEntity DeserializePrebuiltEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string category = default; + string description = default; + string examples = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("examples"u8)) + { + examples = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{options.Format}' format."); + } + } + + PrebuiltEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePrebuiltEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PrebuiltEntity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePrebuiltEntity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.cs new file mode 100644 index 000000000000..f03feb9f25e0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/PrebuiltEntity.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a supported prebuilt entity. + public partial class PrebuiltEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The description. + /// English examples for the entity. + /// or is null. + internal PrebuiltEntity(string description, string examples) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(examples, nameof(examples)); + + Description = description; + Examples = examples; + } + + /// Initializes a new instance of . + /// The prebuilt entity category. + /// The description. + /// English examples for the entity. + /// Keeps track of any properties unknown to the library. + internal PrebuiltEntity(string category, string description, string examples, IDictionary serializedAdditionalRawData) + { + Category = category; + Description = description; + Examples = examples; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrebuiltEntity() + { + } + + /// The prebuilt entity category. + public string Category { get; } + /// The description. + public string Description { get; } + /// English examples for the entity. + public string Examples { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs new file mode 100644 index 000000000000..db31db0899db --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ProjectDeletionJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectDeletionJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + + internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeletionJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeletionJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectDeletionJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectDeletionJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeletionJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.cs new file mode 100644 index 000000000000..fb15e24680aa --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeletionJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a project deletion job. + public partial class ProjectDeletionJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal ProjectDeletionJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal ProjectDeletionJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeletionJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs new file mode 100644 index 000000000000..cb308a7742e2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ProjectDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("deploymentName"u8); + writer.WriteStringValue(DeploymentName); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WritePropertyName("deploymentExpirationDate"u8); + writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("assignedResources"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectDeployment(document.RootElement, options); + } + + internal static ProjectDeployment DeserializeProjectDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string deploymentName = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + DateTimeOffset lastDeployedDateTime = default; + DateTimeOffset deploymentExpirationDate = default; + string modelTrainingConfigVersion = default; + IReadOnlyList assignedResources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentName"u8)) + { + deploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("deploymentExpirationDate"u8)) + { + deploymentExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("assignedResources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentResource.DeserializeDeploymentResource(item, options)); + } + assignedResources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedDateTime, + lastDeployedDateTime, + deploymentExpirationDate, + modelTrainingConfigVersion, + assignedResources, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support writing '{options.Format}' format."); + } + } + + ProjectDeployment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectDeployment)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectDeployment(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.cs new file mode 100644 index 000000000000..80bbd68c4530 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectDeployment.cs @@ -0,0 +1,112 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents a project deployment. + public partial class ProjectDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// , or is null. + internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IEnumerable assignedResources) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + Argument.AssertNotNull(assignedResources, nameof(assignedResources)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources.ToList(); + } + + /// Initializes a new instance of . + /// Represents deployment name. + /// Represents deployment modelId. + /// Represents deployment last trained time. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. + /// Represents model training config version. + /// Represents the metadata of the assigned Azure resources. + /// Keeps track of any properties unknown to the library. + internal ProjectDeployment(string deploymentName, string modelId, DateTimeOffset lastTrainedDateTime, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate, string modelTrainingConfigVersion, IReadOnlyList assignedResources, IDictionary serializedAdditionalRawData) + { + DeploymentName = deploymentName; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + DeploymentExpirationDate = deploymentExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + AssignedResources = assignedResources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectDeployment() + { + } + + /// Represents deployment name. + public string DeploymentName { get; } + /// Represents deployment modelId. + public string ModelId { get; } + /// Represents deployment last trained time. + public DateTimeOffset LastTrainedDateTime { get; } + /// Represents deployment last deployed time. + public DateTimeOffset LastDeployedDateTime { get; } + /// Represents deployment expiration date in the runtime. + public DateTimeOffset DeploymentExpirationDate { get; } + /// Represents model training config version. + public string ModelTrainingConfigVersion { get; } + /// Represents the metadata of the assigned Azure resources. + public IReadOnlyList AssignedResources { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.cs new file mode 100644 index 000000000000..1128b63342ac --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectKind.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.Language.Text.Authoring.Models +{ + /// The ProjectKind. + public readonly partial struct ProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProjectKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CustomSingleLabelClassificationValue = "CustomSingleLabelClassification"; + private const string CustomMultiLabelClassificationValue = "CustomMultiLabelClassification"; + private const string CustomEntityRecognitionValue = "CustomEntityRecognition"; + private const string CustomAbstractiveSummarizationValue = "CustomAbstractiveSummarization"; + private const string CustomHealthcareValue = "CustomHealthcare"; + private const string CustomTextSentimentValue = "CustomTextSentiment"; + + /// For building a classification model to classify text using your own data. Each file will have only one label. For example, file 1 is classified as A and file 2 is classified as B. + public static ProjectKind CustomSingleLabelClassification { get; } = new ProjectKind(CustomSingleLabelClassificationValue); + /// For building a classification model to classify text using your own data. Each file can have one or many labels. For example, file 1 is classified as A, B, and C and file 2 is classified as B and C. + public static ProjectKind CustomMultiLabelClassification { get; } = new ProjectKind(CustomMultiLabelClassificationValue); + /// For building an extraction model to identify your domain categories using your own data. + public static ProjectKind CustomEntityRecognition { get; } = new ProjectKind(CustomEntityRecognitionValue); + /// For building an abstractive summarization models which are able to summarize long documents. + public static ProjectKind CustomAbstractiveSummarization { get; } = new ProjectKind(CustomAbstractiveSummarizationValue); + /// For building an text analytics for health model to identify your health domain data. + public static ProjectKind CustomHealthcare { get; } = new ProjectKind(CustomHealthcareValue); + /// For building a sentiment models which are able to extract sentiment for long documents. + public static ProjectKind CustomTextSentiment { get; } = new ProjectKind(CustomTextSentimentValue); + /// Determines if two values are the same. + public static bool operator ==(ProjectKind left, ProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProjectKind left, ProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProjectKind(string value) => new ProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProjectKind other && Equals(other); + /// + public bool Equals(ProjectKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs new file mode 100644 index 000000000000..a8445499979d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ProjectMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastModifiedDateTime"u8); + writer.WriteStringValue(LastModifiedDateTime, "O"); + if (Optional.IsDefined(LastTrainedDateTime)) + { + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime.Value, "O"); + } + if (Optional.IsDefined(LastDeployedDateTime)) + { + writer.WritePropertyName("lastDeployedDateTime"u8); + writer.WriteStringValue(LastDeployedDateTime.Value, "O"); + } + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + writer.WritePropertyName("storageInputContainerName"u8); + writer.WriteStringValue(StorageInputContainerName); + if (Optional.IsDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteObjectValue(Settings, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + } + if (Optional.IsDefined(Multilingual)) + { + writer.WritePropertyName("multilingual"u8); + writer.WriteBooleanValue(Multilingual.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectMetadata(document.RootElement, options); + } + + internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset createdDateTime = default; + DateTimeOffset lastModifiedDateTime = default; + DateTimeOffset? lastTrainedDateTime = default; + DateTimeOffset? lastDeployedDateTime = default; + ProjectKind projectKind = default; + string storageInputContainerName = default; + ProjectSettings settings = default; + string projectName = default; + bool? multilingual = default; + string description = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdDateTime"u8)) + { + createdDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedDateTime"u8)) + { + lastModifiedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastDeployedDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastDeployedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageInputContainerName"u8)) + { + storageInputContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + settings = ProjectSettings.DeserializeProjectSettings(property.Value, options); + continue; + } + if (property.NameEquals("projectName"u8)) + { + projectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("multilingual"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multilingual = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectMetadata( + createdDateTime, + lastModifiedDateTime, + lastTrainedDateTime, + lastDeployedDateTime, + projectKind, + storageInputContainerName, + settings, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support writing '{options.Format}' format."); + } + } + + ProjectMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.cs new file mode 100644 index 000000000000..3f8cb7abb7f0 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectMetadata.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the metadata of a project. + public partial class ProjectMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// The project kind. + /// The storage container name. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// or is null. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, ProjectKind projectKind, string storageInputContainerName, string language) + { + Argument.AssertNotNull(storageInputContainerName, nameof(storageInputContainerName)); + Argument.AssertNotNull(language, nameof(language)); + + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Language = language; + } + + /// Initializes a new instance of . + /// Represents the project creation datetime. + /// Represents the project last modification datetime. + /// Represents the project last training datetime. + /// Represents the project last deployment datetime. + /// The project kind. + /// The storage container name. + /// The project settings. + /// The new project name. + /// Whether the project would be used for multiple languages or not. + /// The project description. + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModifiedDateTime, DateTimeOffset? lastTrainedDateTime, DateTimeOffset? lastDeployedDateTime, ProjectKind projectKind, string storageInputContainerName, ProjectSettings settings, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) + { + CreatedDateTime = createdDateTime; + LastModifiedDateTime = lastModifiedDateTime; + LastTrainedDateTime = lastTrainedDateTime; + LastDeployedDateTime = lastDeployedDateTime; + ProjectKind = projectKind; + StorageInputContainerName = storageInputContainerName; + Settings = settings; + ProjectName = projectName; + Multilingual = multilingual; + Description = description; + Language = language; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectMetadata() + { + } + + /// Represents the project creation datetime. + public DateTimeOffset CreatedDateTime { get; } + /// Represents the project last modification datetime. + public DateTimeOffset LastModifiedDateTime { get; } + /// Represents the project last training datetime. + public DateTimeOffset? LastTrainedDateTime { get; } + /// Represents the project last deployment datetime. + public DateTimeOffset? LastDeployedDateTime { get; } + /// The project kind. + public ProjectKind ProjectKind { get; } + /// The storage container name. + public string StorageInputContainerName { get; } + /// The project settings. + public ProjectSettings Settings { get; } + /// The new project name. + public string ProjectName { get; } + /// Whether the project would be used for multiple languages or not. + public bool? Multilingual { get; } + /// The project description. + public string Description { get; } + /// The project language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string Language { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs new file mode 100644 index 000000000000..87f03016db1e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ProjectSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConfidenceThreshold)) + { + writer.WritePropertyName("confidenceThreshold"u8); + writer.WriteNumberValue(ConfidenceThreshold.Value); + } + if (Optional.IsDefined(AmlProjectPath)) + { + writer.WritePropertyName("amlProjectPath"u8); + writer.WriteStringValue(AmlProjectPath); + } + if (Optional.IsDefined(IsLabelingLocked)) + { + writer.WritePropertyName("isLabelingLocked"u8); + writer.WriteBooleanValue(IsLabelingLocked.Value); + } + if (Optional.IsDefined(RunGptPredictions)) + { + writer.WritePropertyName("runGptPredictions"u8); + writer.WriteBooleanValue(RunGptPredictions.Value); + } + if (Optional.IsDefined(GptPredictiveLookahead)) + { + writer.WritePropertyName("gptPredictiveLookahead"u8); + writer.WriteNumberValue(GptPredictiveLookahead.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectSettings(document.RootElement, options); + } + + internal static ProjectSettings DeserializeProjectSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float? confidenceThreshold = default; + string amlProjectPath = default; + bool? isLabelingLocked = default; + bool? runGptPredictions = default; + int? gptPredictiveLookahead = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confidenceThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + confidenceThreshold = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("amlProjectPath"u8)) + { + amlProjectPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLabelingLocked"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLabelingLocked = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("runGptPredictions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runGptPredictions = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("gptPredictiveLookahead"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gptPredictiveLookahead = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectSettings( + confidenceThreshold, + amlProjectPath, + isLabelingLocked, + runGptPredictions, + gptPredictiveLookahead, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support writing '{options.Format}' format."); + } + } + + ProjectSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.cs new file mode 100644 index 000000000000..201efeaf3dbd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectSettings.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the settings used to define the project behavior. + public partial class ProjectSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectSettings() + { + } + + /// Initializes a new instance of . + /// The threshold of the class with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + /// The path to the AML connected project. + /// Indicates whether the labeling experience can be modified or not. + /// Indicates whether to run GPT predictions or not. + /// The predictive lookahead for GPT predictions that is specified by the user. + /// Keeps track of any properties unknown to the library. + internal ProjectSettings(float? confidenceThreshold, string amlProjectPath, bool? isLabelingLocked, bool? runGptPredictions, int? gptPredictiveLookahead, IDictionary serializedAdditionalRawData) + { + ConfidenceThreshold = confidenceThreshold; + AmlProjectPath = amlProjectPath; + IsLabelingLocked = isLabelingLocked; + RunGptPredictions = runGptPredictions; + GptPredictiveLookahead = gptPredictiveLookahead; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The threshold of the class with the highest confidence, at which the prediction will automatically be changed to "None". The value of the threshold should be between 0 and 1 inclusive. + public float? ConfidenceThreshold { get; set; } + /// The path to the AML connected project. + public string AmlProjectPath { get; set; } + /// Indicates whether the labeling experience can be modified or not. + public bool? IsLabelingLocked { get; set; } + /// Indicates whether to run GPT predictions or not. + public bool? RunGptPredictions { get; set; } + /// The predictive lookahead for GPT predictions that is specified by the user. + public int? GptPredictiveLookahead { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs new file mode 100644 index 000000000000..85ce49210c58 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ProjectTrainedModel : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); + writer.WritePropertyName("lastTrainedDateTime"u8); + writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WritePropertyName("lastTrainingDurationInSeconds"u8); + writer.WriteNumberValue(LastTrainingDurationInSeconds); + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WritePropertyName("modelTrainingConfigVersion"u8); + writer.WriteStringValue(ModelTrainingConfigVersion); + writer.WritePropertyName("hasSnapshot"u8); + writer.WriteBooleanValue(HasSnapshot); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectTrainedModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + + internal static ProjectTrainedModel DeserializeProjectTrainedModel(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string label = default; + string modelId = default; + DateTimeOffset lastTrainedDateTime = default; + int lastTrainingDurationInSeconds = default; + DateTimeOffset modelExpirationDate = default; + string modelTrainingConfigVersion = default; + bool hasSnapshot = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTrainedDateTime"u8)) + { + lastTrainedDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastTrainingDurationInSeconds"u8)) + { + lastTrainingDurationInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (property.NameEquals("modelTrainingConfigVersion"u8)) + { + modelTrainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hasSnapshot"u8)) + { + hasSnapshot = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectTrainedModel( + label, + modelId, + lastTrainedDateTime, + lastTrainingDurationInSeconds, + modelExpirationDate, + modelTrainingConfigVersion, + hasSnapshot, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support writing '{options.Format}' format."); + } + } + + ProjectTrainedModel IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProjectTrainedModel(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectTrainedModel)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ProjectTrainedModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeProjectTrainedModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.cs new file mode 100644 index 000000000000..18f8ba677a75 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ProjectTrainedModel.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a trained model. + public partial class ProjectTrainedModel + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// or is null. + internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot) + { + Argument.AssertNotNull(modelId, nameof(modelId)); + Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); + + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + } + + /// Initializes a new instance of . + /// The trained model label. + /// The model ID. + /// The last trained date time of the model. + /// The duration of the model's last training request in seconds. + /// The model expiration date. + /// The model training config version. + /// The flag to indicate if the trained model has a snapshot ready. + /// Keeps track of any properties unknown to the library. + internal ProjectTrainedModel(string label, string modelId, DateTimeOffset lastTrainedDateTime, int lastTrainingDurationInSeconds, DateTimeOffset modelExpirationDate, string modelTrainingConfigVersion, bool hasSnapshot, IDictionary serializedAdditionalRawData) + { + Label = label; + ModelId = modelId; + LastTrainedDateTime = lastTrainedDateTime; + LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; + ModelExpirationDate = modelExpirationDate; + ModelTrainingConfigVersion = modelTrainingConfigVersion; + HasSnapshot = hasSnapshot; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectTrainedModel() + { + } + + /// The trained model label. + public string Label { get; } + /// The model ID. + public string ModelId { get; } + /// The last trained date time of the model. + public DateTimeOffset LastTrainedDateTime { get; } + /// The duration of the model's last training request in seconds. + public int LastTrainingDurationInSeconds { get; } + /// The model expiration date. + public DateTimeOffset ModelExpirationDate { get; } + /// The model training config version. + public string ModelTrainingConfigVersion { get; } + /// The flag to indicate if the trained model has a snapshot ready. + public bool HasSnapshot { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs new file mode 100644 index 000000000000..1baccdd06335 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class ResourceMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + writer.WritePropertyName("customDomain"u8); + writer.WriteStringValue(CustomDomain); + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResourceMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceMetadata(document.RootElement, options); + } + + internal static ResourceMetadata DeserializeResourceMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azureResourceId = default; + string customDomain = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("customDomain"u8)) + { + customDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceMetadata(azureResourceId, customDomain, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support writing '{options.Format}' format."); + } + } + + ResourceMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResourceMetadata FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceMetadata(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.cs new file mode 100644 index 000000000000..b7c65fd38a96 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/ResourceMetadata.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents metadata for the Azure resource.. + public partial class ResourceMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// , or is null. + public ResourceMetadata(string azureResourceId, string customDomain, string region) + { + Argument.AssertNotNull(azureResourceId, nameof(azureResourceId)); + Argument.AssertNotNull(customDomain, nameof(customDomain)); + Argument.AssertNotNull(region, nameof(region)); + + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + } + + /// Initializes a new instance of . + /// Represents the Azure resource ID. + /// Represents the Azure resource custom domain. + /// Represents the Azure resource region. + /// Keeps track of any properties unknown to the library. + internal ResourceMetadata(string azureResourceId, string customDomain, string region, IDictionary serializedAdditionalRawData) + { + AzureResourceId = azureResourceId; + CustomDomain = customDomain; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ResourceMetadata() + { + } + + /// Represents the Azure resource ID. + public string AzureResourceId { get; } + /// Represents the Azure resource custom domain. + public string CustomDomain { get; } + /// Represents the Azure resource region. + public string Region { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..76bafc3c7a2d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSentimentEvaluationSummary(document.RootElement, options); + } + + internal static SentimentEvaluationSummary DeserializeSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SentimentEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SentimentEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SentimentEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSentimentEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs new file mode 100644 index 000000000000..02a73f988602 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SentimentEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a sentiment in a custom sentiment project. + public partial class SentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal SentimentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal SentimentEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SentimentEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..a51b799bec80 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SingleLabelClassEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("f1"u8); + writer.WriteNumberValue(F1); + writer.WritePropertyName("precision"u8); + writer.WriteNumberValue(Precision); + writer.WritePropertyName("recall"u8); + writer.WriteNumberValue(Recall); + writer.WritePropertyName("truePositiveCount"u8); + writer.WriteNumberValue(TruePositiveCount); + writer.WritePropertyName("trueNegativeCount"u8); + writer.WriteNumberValue(TrueNegativeCount); + writer.WritePropertyName("falsePositiveCount"u8); + writer.WriteNumberValue(FalsePositiveCount); + writer.WritePropertyName("falseNegativeCount"u8); + writer.WriteNumberValue(FalseNegativeCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleLabelClassEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleLabelClassEvaluationSummary(document.RootElement, options); + } + + internal static SingleLabelClassEvaluationSummary DeserializeSingleLabelClassEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double f1 = default; + double precision = default; + double recall = default; + int truePositiveCount = default; + int trueNegativeCount = default; + int falsePositiveCount = default; + int falseNegativeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("f1"u8)) + { + f1 = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("precision"u8)) + { + precision = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("recall"u8)) + { + recall = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("truePositiveCount"u8)) + { + truePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trueNegativeCount"u8)) + { + trueNegativeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falsePositiveCount"u8)) + { + falsePositiveCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("falseNegativeCount"u8)) + { + falseNegativeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleLabelClassEvaluationSummary( + f1, + precision, + recall, + truePositiveCount, + trueNegativeCount, + falsePositiveCount, + falseNegativeCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SingleLabelClassEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleLabelClassEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleLabelClassEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SingleLabelClassEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSingleLabelClassEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs new file mode 100644 index 000000000000..2a2e041f9d7a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassEvaluationSummary.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a class in a single-label classification project. + public partial class SingleLabelClassEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + internal SingleLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + } + + /// Initializes a new instance of . + /// Represents the model precision. + /// Represents the model recall. + /// Represents the model F1 score. + /// Represents the count of true positive. + /// Represents the count of true negative. + /// Represents the count of false positive. + /// Represents the count of false negative. + /// Keeps track of any properties unknown to the library. + internal SingleLabelClassEvaluationSummary(double f1, double precision, double recall, int truePositiveCount, int trueNegativeCount, int falsePositiveCount, int falseNegativeCount, IDictionary serializedAdditionalRawData) + { + F1 = f1; + Precision = precision; + Recall = recall; + TruePositiveCount = truePositiveCount; + TrueNegativeCount = trueNegativeCount; + FalsePositiveCount = falsePositiveCount; + FalseNegativeCount = falseNegativeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SingleLabelClassEvaluationSummary() + { + } + + /// Represents the model precision. + public double F1 { get; } + /// Represents the model recall. + public double Precision { get; } + /// Represents the model F1 score. + public double Recall { get; } + /// Represents the count of true positive. + public int TruePositiveCount { get; } + /// Represents the count of true negative. + public int TrueNegativeCount { get; } + /// Represents the count of false positive. + public int FalsePositiveCount { get; } + /// Represents the count of false negative. + public int FalseNegativeCount { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..c917409f2951 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SingleLabelClassificationEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("classes"u8); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleLabelClassificationEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + + internal static SingleLabelClassificationEvaluationSummary DeserializeSingleLabelClassificationEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary classes = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("classes"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SingleLabelClassEvaluationSummary.DeserializeSingleLabelClassEvaluationSummary(property0.Value, options)); + } + classes = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleLabelClassificationEvaluationSummary( + confusionMatrix, + classes, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SingleLabelClassificationEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSingleLabelClassificationEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleLabelClassificationEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SingleLabelClassificationEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSingleLabelClassificationEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.cs new file mode 100644 index 000000000000..3a735be43129 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SingleLabelClassificationEvaluationSummary.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom single-label classification project. + public partial class SingleLabelClassificationEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(classes, nameof(classes)); + + ConfusionMatrix = confusionMatrix; + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + /// Represents the classes evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal SingleLabelClassificationEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary classes, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Classes = classes; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SingleLabelClassificationEvaluationSummary() + { + } + + /// Represents the confusion matrix between two classes (the two classes can be the same). The matrix is between the class that was labelled and the class that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the classes evaluation. + public IReadOnlyDictionary Classes { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..8d1f2520c7be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SpanSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("confusionMatrix"u8); + writer.WriteObjectValue(ConfusionMatrix, options); + writer.WritePropertyName("sentiments"u8); + writer.WriteStartObject(); + foreach (var item in Sentiments) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SpanSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSpanSentimentEvaluationSummary(document.RootElement, options); + } + + internal static SpanSentimentEvaluationSummary DeserializeSpanSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary sentiments = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("confusionMatrix"u8)) + { + confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + continue; + } + if (property.NameEquals("sentiments"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SentimentEvaluationSummary.DeserializeSentimentEvaluationSummary(property0.Value, options)); + } + sentiments = dictionary; + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SpanSentimentEvaluationSummary( + confusionMatrix, + sentiments, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + SpanSentimentEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSpanSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SpanSentimentEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SpanSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSpanSentimentEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..7bb8d1d8d726 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SpanSentimentEvaluationSummary.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom sentiment project. + public partial class SpanSentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// or is null. + internal SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary sentiments, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(confusionMatrix, nameof(confusionMatrix)); + Argument.AssertNotNull(sentiments, nameof(sentiments)); + + ConfusionMatrix = confusionMatrix; + Sentiments = sentiments; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + /// Represents the sentiment evaluation. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal SpanSentimentEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDictionary sentiments, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + ConfusionMatrix = confusionMatrix; + Sentiments = sentiments; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SpanSentimentEvaluationSummary() + { + } + + /// Represents the confusion matrix between two sentiments (the two sentiments can be the same). The matrix is between the sentiment that was labelled and the sentiment that was predicted. + public ConfusionMatrix ConfusionMatrix { get; } + /// Represents the sentiment evaluation. + public IReadOnlyDictionary Sentiments { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.cs new file mode 100644 index 000000000000..fefd32f82ab1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/StringIndexType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The StringIndexType. + 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 Utf16CodeUnitValue = "Utf16CodeUnit"; + + /// The offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. + 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 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 != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs new file mode 100644 index 000000000000..692f5394699a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SubTrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete); + if (Optional.IsDefined(StartDateTime)) + { + writer.WritePropertyName("startDateTime"u8); + writer.WriteStringValue(StartDateTime.Value, "O"); + } + if (Optional.IsDefined(EndDateTime)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SubTrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + + internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int percentComplete = default; + DateTimeOffset? startDateTime = default; + DateTimeOffset? endDateTime = default; + JobStatus status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("percentComplete"u8)) + { + percentComplete = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + SubTrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSubTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SubTrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSubTrainingJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.cs new file mode 100644 index 000000000000..da27123aa226 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SubTrainingJobState.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the detailed state of a training sub-operation. + public partial class SubTrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the status of the sub-operation. + internal SubTrainingJobState(int percentComplete, JobStatus status) + { + PercentComplete = percentComplete; + Status = status; + } + + /// Initializes a new instance of . + /// Represents progress percentage. + /// Represents the start date time. + /// Represents the end date time. + /// Represents the status of the sub-operation. + /// Keeps track of any properties unknown to the library. + internal SubTrainingJobState(int percentComplete, DateTimeOffset? startDateTime, DateTimeOffset? endDateTime, JobStatus status, IDictionary serializedAdditionalRawData) + { + PercentComplete = percentComplete; + StartDateTime = startDateTime; + EndDateTime = endDateTime; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SubTrainingJobState() + { + } + + /// Represents progress percentage. + public int PercentComplete { get; } + /// Represents the start date time. + public DateTimeOffset? StartDateTime { get; } + /// Represents the end date time. + public DateTimeOffset? EndDateTime { get; } + /// Represents the status of the sub-operation. + public JobStatus Status { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs new file mode 100644 index 000000000000..4b9ed7f539a1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SupportedLanguage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("languageName"u8); + writer.WriteStringValue(LanguageName); + } + writer.WritePropertyName("languageCode"u8); + writer.WriteStringValue(LanguageCode); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SupportedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSupportedLanguage(document.RootElement, options); + } + + internal static SupportedLanguage DeserializeSupportedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string languageName = default; + string languageCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("languageName"u8)) + { + languageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("languageCode"u8)) + { + languageCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{options.Format}' format."); + } + } + + SupportedLanguage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSupportedLanguage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SupportedLanguage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SupportedLanguage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSupportedLanguage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.cs new file mode 100644 index 000000000000..ca301a1aafee --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SupportedLanguage.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; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a supported language. + public partial class SupportedLanguage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// is null. + internal SupportedLanguage(string languageCode) + { + Argument.AssertNotNull(languageCode, nameof(languageCode)); + + LanguageCode = languageCode; + } + + /// Initializes a new instance of . + /// The language name. + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal SupportedLanguage(string languageName, string languageCode, IDictionary serializedAdditionalRawData) + { + LanguageName = languageName; + LanguageCode = languageCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SupportedLanguage() + { + } + + /// The language name. + public string LanguageName { get; } + /// The language code. This is BCP-47 representation of a language. For example, "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + public string LanguageCode { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs new file mode 100644 index 000000000000..9f6daa985967 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SwapDeploymentsDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstDeploymentName"u8); + writer.WriteStringValue(FirstDeploymentName); + writer.WritePropertyName("secondDeploymentName"u8); + writer.WriteStringValue(SecondDeploymentName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SwapDeploymentsDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + + internal static SwapDeploymentsDetails DeserializeSwapDeploymentsDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstDeploymentName = default; + string secondDeploymentName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstDeploymentName"u8)) + { + firstDeploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondDeploymentName"u8)) + { + secondDeploymentName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsDetails(firstDeploymentName, secondDeploymentName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSwapDeploymentsDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SwapDeploymentsDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs new file mode 100644 index 000000000000..7c9948cf6222 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsDetails.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for swapping two deployments together. + public partial class SwapDeploymentsDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// or is null. + public SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName) + { + Argument.AssertNotNull(firstDeploymentName, nameof(firstDeploymentName)); + Argument.AssertNotNull(secondDeploymentName, nameof(secondDeploymentName)); + + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + } + + /// Initializes a new instance of . + /// Represents the first deployment name. + /// Represents the second deployment name. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsDetails(string firstDeploymentName, string secondDeploymentName, IDictionary serializedAdditionalRawData) + { + FirstDeploymentName = firstDeploymentName; + SecondDeploymentName = secondDeploymentName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsDetails() + { + } + + /// Represents the first deployment name. + public string FirstDeploymentName { get; } + /// Represents the second deployment name. + public string SecondDeploymentName { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs new file mode 100644 index 000000000000..dde6e28f3bc7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class SwapDeploymentsJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SwapDeploymentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + + internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SwapDeploymentsJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support writing '{options.Format}' format."); + } + } + + SwapDeploymentsJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSwapDeploymentsJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SwapDeploymentsJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSwapDeploymentsJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs new file mode 100644 index 000000000000..76a22023a980 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a deployment job. + public partial class SwapDeploymentsJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal SwapDeploymentsJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal SwapDeploymentsJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.Serialization.cs new file mode 100644 index 000000000000..639bd57d140b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TextAnalysisAuthoringError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.ToString()); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Innererror)) + { + writer.WritePropertyName("innererror"u8); + writer.WriteObjectValue(Innererror, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TextAnalysisAuthoringError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextAnalysisAuthoringError(document.RootElement, options); + } + + internal static TextAnalysisAuthoringError DeserializeTextAnalysisAuthoringError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCode code = default; + string message = default; + string target = default; + IReadOnlyList details = default; + InnerErrorModel innererror = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = new ErrorCode(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(DeserializeTextAnalysisAuthoringError(item, options)); + } + details = array; + continue; + } + if (property.NameEquals("innererror"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + innererror = InnerErrorModel.DeserializeInnerErrorModel(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextAnalysisAuthoringError( + code, + message, + target, + details ?? new ChangeTrackingList(), + innererror, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} does not support writing '{options.Format}' format."); + } + } + + TextAnalysisAuthoringError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTextAnalysisAuthoringError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextAnalysisAuthoringError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextAnalysisAuthoringError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.cs new file mode 100644 index 000000000000..15dff55f6060 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringError.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// The error object. + public partial class TextAnalysisAuthoringError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// One of a server-defined set of error codes. + /// A human-readable representation of the error. + /// is null. + internal TextAnalysisAuthoringError(ErrorCode code, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 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. + /// Keeps track of any properties unknown to the library. + internal TextAnalysisAuthoringError(ErrorCode code, string message, string target, IReadOnlyList details, InnerErrorModel innererror, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Target = target; + Details = details; + Innererror = innererror; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextAnalysisAuthoringError() + { + } + + /// One of a server-defined set of error codes. + public ErrorCode Code { get; } + /// A human-readable representation of the error. + public string Message { get; } + /// The target of the error. + public string Target { get; } + /// An array of details about specific errors that led to this reported error. + public IReadOnlyList Details { get; } + /// An object containing more specific information than the current object about the error. + public InnerErrorModel Innererror { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.cs new file mode 100644 index 000000000000..07d7c9165af7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringSentiment.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.Language.Text.Authoring.Models +{ + /// The TextAnalysisAuthoringSentiment. + public readonly partial struct TextAnalysisAuthoringSentiment : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TextAnalysisAuthoringSentiment(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PositiveValue = "positive"; + private const string NegativeValue = "negative"; + private const string NeutralValue = "neutral"; + + /// positive. + public static TextAnalysisAuthoringSentiment Positive { get; } = new TextAnalysisAuthoringSentiment(PositiveValue); + /// negative. + public static TextAnalysisAuthoringSentiment Negative { get; } = new TextAnalysisAuthoringSentiment(NegativeValue); + /// neutral. + public static TextAnalysisAuthoringSentiment Neutral { get; } = new TextAnalysisAuthoringSentiment(NeutralValue); + /// Determines if two values are the same. + public static bool operator ==(TextAnalysisAuthoringSentiment left, TextAnalysisAuthoringSentiment right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TextAnalysisAuthoringSentiment left, TextAnalysisAuthoringSentiment right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TextAnalysisAuthoringSentiment(string value) => new TextAnalysisAuthoringSentiment(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TextAnalysisAuthoringSentiment other && Equals(other); + /// + public bool Equals(TextAnalysisAuthoringSentiment other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.Serialization.cs new file mode 100644 index 000000000000..80e627120fa3 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TextAnalysisAuthoringWarning : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TextAnalysisAuthoringWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextAnalysisAuthoringWarning(document.RootElement, options); + } + + internal static TextAnalysisAuthoringWarning DeserializeTextAnalysisAuthoringWarning(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextAnalysisAuthoringWarning(code, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support writing '{options.Format}' format."); + } + } + + TextAnalysisAuthoringWarning IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTextAnalysisAuthoringWarning(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextAnalysisAuthoringWarning)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextAnalysisAuthoringWarning FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextAnalysisAuthoringWarning(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.cs new file mode 100644 index 000000000000..cfea09f1cf4d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextAnalysisAuthoringWarning.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a warning that was encountered while executing the request. + public partial class TextAnalysisAuthoringWarning + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// or is null. + internal TextAnalysisAuthoringWarning(string code, string message) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Code = code; + Message = message; + } + + /// Initializes a new instance of . + /// The warning code. + /// The warning message. + /// Keeps track of any properties unknown to the library. + internal TextAnalysisAuthoringWarning(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextAnalysisAuthoringWarning() + { + } + + /// The warning code. + public string Code { get; } + /// The warning message. + public string Message { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..912d38014e63 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TextSentimentEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("spanSentimentsEvaluation"u8); + writer.WriteObjectValue(SpanSentimentsEvaluation, options); + writer.WritePropertyName("microF1"u8); + writer.WriteNumberValue(MicroF1); + writer.WritePropertyName("microPrecision"u8); + writer.WriteNumberValue(MicroPrecision); + writer.WritePropertyName("microRecall"u8); + writer.WriteNumberValue(MicroRecall); + writer.WritePropertyName("macroF1"u8); + writer.WriteNumberValue(MacroF1); + writer.WritePropertyName("macroPrecision"u8); + writer.WriteNumberValue(MacroPrecision); + writer.WritePropertyName("macroRecall"u8); + writer.WriteNumberValue(MacroRecall); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TextSentimentEvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextSentimentEvaluationSummary(document.RootElement, options); + } + + internal static TextSentimentEvaluationSummary DeserializeTextSentimentEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SpanSentimentEvaluationSummary spanSentimentsEvaluation = default; + float microF1 = default; + float microPrecision = default; + float microRecall = default; + float macroF1 = default; + float macroPrecision = default; + float macroRecall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("spanSentimentsEvaluation"u8)) + { + spanSentimentsEvaluation = SpanSentimentEvaluationSummary.DeserializeSpanSentimentEvaluationSummary(property.Value, options); + continue; + } + if (property.NameEquals("microF1"u8)) + { + microF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microPrecision"u8)) + { + microPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("microRecall"u8)) + { + microRecall = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroF1"u8)) + { + macroF1 = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroPrecision"u8)) + { + macroPrecision = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("macroRecall"u8)) + { + macroRecall = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextSentimentEvaluationSummary( + spanSentimentsEvaluation, + microF1, + microPrecision, + microRecall, + macroF1, + macroPrecision, + macroRecall, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + TextSentimentEvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTextSentimentEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextSentimentEvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextSentimentEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextSentimentEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.cs new file mode 100644 index 000000000000..b26aef8f4bcb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TextSentimentEvaluationSummary.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the evaluation summary for a custom text sentiment project. + public partial class TextSentimentEvaluationSummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// is null. + internal TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall) + { + Argument.AssertNotNull(spanSentimentsEvaluation, nameof(spanSentimentsEvaluation)); + + SpanSentimentsEvaluation = spanSentimentsEvaluation; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + } + + /// Initializes a new instance of . + /// Represents evaluation of span level sentiments. + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + /// Keeps track of any properties unknown to the library. + internal TextSentimentEvaluationSummary(SpanSentimentEvaluationSummary spanSentimentsEvaluation, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) + { + SpanSentimentsEvaluation = spanSentimentsEvaluation; + MicroF1 = microF1; + MicroPrecision = microPrecision; + MicroRecall = microRecall; + MacroF1 = macroF1; + MacroPrecision = macroPrecision; + MacroRecall = macroRecall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextSentimentEvaluationSummary() + { + } + + /// Represents evaluation of span level sentiments. + public SpanSentimentEvaluationSummary SpanSentimentsEvaluation { get; } + /// Represents the micro F1. Expected value is a float between 0 and 1 inclusive. + public float MicroF1 { get; } + /// Represents the micro precision. Expected value is a float between 0 and 1 inclusive. + public float MicroPrecision { get; } + /// Represents the micro recall. Expected value is a float between 0 and 1 inclusive. + public float MicroRecall { get; } + /// Represents the macro F1. Expected value is a float between 0 and 1 inclusive. + public float MacroF1 { get; } + /// Represents the macro precision. Expected value is a float between 0 and 1 inclusive. + public float MacroPrecision { get; } + /// Represents the macro recall. Expected value is a float between 0 and 1 inclusive. + public float MacroRecall { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs new file mode 100644 index 000000000000..cc67acb26600 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingConfigVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersionProperty); + } + writer.WritePropertyName("modelExpirationDate"u8); + writer.WriteStringValue(ModelExpirationDate, "D"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingConfigVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + + internal static TrainingConfigVersion DeserializeTrainingConfigVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trainingConfigVersion = default; + DateTimeOffset modelExpirationDate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelExpirationDate"u8)) + { + modelExpirationDate = property.Value.GetDateTimeOffset("D"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingConfigVersion(trainingConfigVersion, modelExpirationDate, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{options.Format}' format."); + } + } + + TrainingConfigVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingConfigVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingConfigVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingConfigVersion(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.cs new file mode 100644 index 000000000000..439f9952112a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingConfigVersion.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents a training config version. + public partial class TrainingConfigVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the training config version expiration date. + internal TrainingConfigVersion(DateTimeOffset modelExpirationDate) + { + ModelExpirationDate = modelExpirationDate; + } + + /// Initializes a new instance of . + /// Represents the version of the config. + /// Represents the training config version expiration date. + /// Keeps track of any properties unknown to the library. + internal TrainingConfigVersion(string trainingConfigVersionProperty, DateTimeOffset modelExpirationDate, IDictionary serializedAdditionalRawData) + { + TrainingConfigVersionProperty = trainingConfigVersionProperty; + ModelExpirationDate = modelExpirationDate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingConfigVersion() + { + } + + /// Represents the version of the config. + public string TrainingConfigVersionProperty { get; } + /// Represents the training config version expiration date. + public DateTimeOffset ModelExpirationDate { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs new file mode 100644 index 000000000000..4b9afd2b96e2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingJobDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + if (Optional.IsDefined(EvaluationOptions)) + { + writer.WritePropertyName("evaluationOptions"u8); + writer.WriteObjectValue(EvaluationOptions, options); + } + if (Optional.IsDefined(DataGenerationSettings)) + { + writer.WritePropertyName("dataGenerationSettings"u8); + writer.WriteObjectValue(DataGenerationSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + + internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + EvaluationDetails evaluationOptions = default; + DataGenerationSettings dataGenerationSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (property.NameEquals("dataGenerationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataGenerationSettings = DataGenerationSettings.DeserializeDataGenerationSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobDetails(modelLabel, trainingConfigVersion, evaluationOptions, dataGenerationSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.cs new file mode 100644 index 000000000000..2f80cac3f016 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobDetails.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the options for starting a new training job. + public partial class TrainingJobDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// or is null. + public TrainingJobDetails(string modelLabel, string trainingConfigVersion) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + } + + /// Initializes a new instance of . + /// Represents the output model label. + /// Represents training config version. + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + /// Represents the settings for using data generation as part of training a custom model. + /// Keeps track of any properties unknown to the library. + internal TrainingJobDetails(string modelLabel, string trainingConfigVersion, EvaluationDetails evaluationOptions, DataGenerationSettings dataGenerationSettings, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + EvaluationOptions = evaluationOptions; + DataGenerationSettings = dataGenerationSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobDetails() + { + } + + /// Represents the output model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents the evaluation options. By default, the evaluation kind is percentage, with training split percentage as 80, and testing split percentage as 20. + public EvaluationDetails EvaluationOptions { get; set; } + /// Represents the settings for using data generation as part of training a custom model. + public DataGenerationSettings DataGenerationSettings { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs new file mode 100644 index 000000000000..d349f1b2beb4 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingJobResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelLabel"u8); + writer.WriteStringValue(ModelLabel); + writer.WritePropertyName("trainingConfigVersion"u8); + writer.WriteStringValue(TrainingConfigVersion); + writer.WritePropertyName("trainingStatus"u8); + writer.WriteObjectValue(TrainingStatus, options); + if (Optional.IsDefined(EvaluationStatus)) + { + writer.WritePropertyName("evaluationStatus"u8); + writer.WriteObjectValue(EvaluationStatus, options); + } + if (Optional.IsDefined(EstimatedEndDateTime)) + { + writer.WritePropertyName("estimatedEndDateTime"u8); + writer.WriteStringValue(EstimatedEndDateTime.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobResult(document.RootElement, options); + } + + internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelLabel = default; + string trainingConfigVersion = default; + SubTrainingJobState trainingStatus = default; + SubTrainingJobState evaluationStatus = default; + DateTimeOffset? estimatedEndDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelLabel"u8)) + { + modelLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingConfigVersion"u8)) + { + trainingConfigVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("trainingStatus"u8)) + { + trainingStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("evaluationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + evaluationStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + continue; + } + if (property.NameEquals("estimatedEndDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedEndDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobResult( + modelLabel, + trainingConfigVersion, + trainingStatus, + evaluationStatus, + estimatedEndDateTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.cs new file mode 100644 index 000000000000..189d1d1c5a27 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobResult.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the output of a training job. + public partial class TrainingJobResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// , or is null. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus) + { + Argument.AssertNotNull(modelLabel, nameof(modelLabel)); + Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); + Argument.AssertNotNull(trainingStatus, nameof(trainingStatus)); + + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + } + + /// Initializes a new instance of . + /// Represents trained model label. + /// Represents training config version. + /// Represents model train status. + /// Represents model evaluation status. + /// Represents the estimate end date time for training and evaluation. + /// Keeps track of any properties unknown to the library. + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus, SubTrainingJobState evaluationStatus, DateTimeOffset? estimatedEndDateTime, IDictionary serializedAdditionalRawData) + { + ModelLabel = modelLabel; + TrainingConfigVersion = trainingConfigVersion; + TrainingStatus = trainingStatus; + EvaluationStatus = evaluationStatus; + EstimatedEndDateTime = estimatedEndDateTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobResult() + { + } + + /// Represents trained model label. + public string ModelLabel { get; } + /// Represents training config version. + public string TrainingConfigVersion { get; } + /// Represents model train status. + public SubTrainingJobState TrainingStatus { get; } + /// Represents model evaluation status. + public SubTrainingJobState EvaluationStatus { get; } + /// Represents the estimate end date time for training and evaluation. + public DateTimeOffset? EstimatedEndDateTime { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs new file mode 100644 index 000000000000..4955c000e750 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class TrainingJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrainingJobState(document.RootElement, options); + } + + internal static TrainingJobState DeserializeTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + TrainingJobResult result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("result"u8)) + { + result = TrainingJobResult.DeserializeTrainingJobResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrainingJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support writing '{options.Format}' format."); + } + } + + TrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTrainingJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TrainingJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTrainingJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.cs new file mode 100644 index 000000000000..70273a6d0a8b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/TrainingJobState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a training job. + public partial class TrainingJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + /// Represents training tasks detailed result. + /// is null. + internal TrainingJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status, TrainingJobResult result) + { + Argument.AssertNotNull(result, nameof(result)); + + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Result = result; + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Represents training tasks detailed result. + /// Keeps track of any properties unknown to the library. + internal TrainingJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, TrainingJobResult result, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TrainingJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + /// Represents training tasks detailed result. + public TrainingJobResult Result { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs new file mode 100644 index 000000000000..7af5951389dc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class UnassignDeploymentResourcesDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("assignedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in AssignedResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UnassignDeploymentResourcesDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + + internal static UnassignDeploymentResourcesDetails DeserializeUnassignDeploymentResourcesDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList assignedResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedResourceIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + assignedResourceIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnassignDeploymentResourcesDetails(assignedResourceIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support writing '{options.Format}' format."); + } + } + + UnassignDeploymentResourcesDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnassignDeploymentResourcesDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnassignDeploymentResourcesDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs new file mode 100644 index 000000000000..d124017054e1 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesDetails.cs @@ -0,0 +1,76 @@ +// 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.Language.Text.Authoring.Models +{ + /// Represents the options to unassign Azure resources from a project. + public partial class UnassignDeploymentResourcesDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// is null. + public UnassignDeploymentResourcesDetails(IEnumerable assignedResourceIds) + { + Argument.AssertNotNull(assignedResourceIds, nameof(assignedResourceIds)); + + AssignedResourceIds = assignedResourceIds.ToList(); + } + + /// Initializes a new instance of . + /// Represents the assigned resource IDs to be unassigned. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesDetails(IList assignedResourceIds, IDictionary serializedAdditionalRawData) + { + AssignedResourceIds = assignedResourceIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesDetails() + { + } + + /// Represents the assigned resource IDs to be unassigned. + public IList AssignedResourceIds { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs new file mode 100644 index 000000000000..ec140802f56a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + public partial class UnassignDeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + writer.WritePropertyName("createdDateTime"u8); + writer.WriteStringValue(CreatedDateTime, "O"); + writer.WritePropertyName("lastUpdatedDateTime"u8); + writer.WriteStringValue(LastUpdatedDateTime, "O"); + if (Optional.IsDefined(ExpirationDateTime)) + { + writer.WritePropertyName("expirationDateTime"u8); + writer.WriteStringValue(ExpirationDateTime.Value, "O"); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsCollectionDefined(Warnings)) + { + writer.WritePropertyName("warnings"u8); + writer.WriteStartArray(); + foreach (var item in Warnings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UnassignDeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnassignDeploymentResourcesJobState(document.RootElement, options); + } + + internal static UnassignDeploymentResourcesJobState DeserializeUnassignDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobId = default; + DateTimeOffset createdDateTime = default; + DateTimeOffset lastUpdatedDateTime = default; + DateTimeOffset? expirationDateTime = default; + JobStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + 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("expirationDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("warnings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringWarning.DeserializeTextAnalysisAuthoringWarning(item, options)); + } + warnings = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextAnalysisAuthoringError.DeserializeTextAnalysisAuthoringError(item, options)); + } + errors = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnassignDeploymentResourcesJobState( + jobId, + createdDateTime, + lastUpdatedDateTime, + expirationDateTime, + status, + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support writing '{options.Format}' format."); + } + } + + UnassignDeploymentResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUnassignDeploymentResourcesJobState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnassignDeploymentResourcesJobState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnassignDeploymentResourcesJobState FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnassignDeploymentResourcesJobState(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.cs new file mode 100644 index 000000000000..b37cfe90d944 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnassignDeploymentResourcesJobState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Represents the state of a unassign deployment resources job. + public partial class UnassignDeploymentResourcesJobState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The creation date time of the job. + /// The last date time the job was updated. + /// The job status. + internal UnassignDeploymentResourcesJobState(DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, JobStatus status) + { + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + Status = status; + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The job ID. + /// The creation date time of the job. + /// The last date time the job was updated. + /// The expiration date time of the job. + /// The job status. + /// The warnings that were encountered while executing the job. + /// The errors encountered while executing the job. + /// Keeps track of any properties unknown to the library. + internal UnassignDeploymentResourcesJobState(string jobId, DateTimeOffset createdDateTime, DateTimeOffset lastUpdatedDateTime, DateTimeOffset? expirationDateTime, JobStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + { + JobId = jobId; + CreatedDateTime = createdDateTime; + LastUpdatedDateTime = lastUpdatedDateTime; + ExpirationDateTime = expirationDateTime; + Status = status; + Warnings = warnings; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UnassignDeploymentResourcesJobState() + { + } + + /// The job ID. + public string JobId { get; } + /// The creation date time of the job. + public DateTimeOffset CreatedDateTime { get; } + /// The last date time the job was updated. + public DateTimeOffset LastUpdatedDateTime { get; } + /// The expiration date time of the job. + public DateTimeOffset? ExpirationDateTime { get; } + /// The job status. + public JobStatus Status { get; } + /// The warnings that were encountered while executing the job. + public IReadOnlyList Warnings { get; } + /// The errors encountered while executing the job. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..4d412ce70bd5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + internal partial class UnknownDocumentEvaluationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DocumentEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + + internal static UnknownDocumentEvaluationResult DeserializeUnknownDocumentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + string location = default; + string language = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDocumentEvaluationResult(projectKind, location, language, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentEvaluationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentEvaluationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownDocumentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownDocumentEvaluationResult(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.cs new file mode 100644 index 000000000000..8b2d8e34dd8e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownDocumentEvaluationResult.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Unknown version of DocumentEvaluationResult. + internal partial class UnknownDocumentEvaluationResult : DocumentEvaluationResult + { + /// Initializes a new instance of . + /// Represents the project kind. + /// Represents the document path. + /// Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + /// Keeps track of any properties unknown to the library. + internal UnknownDocumentEvaluationResult(ProjectKind projectKind, string location, string language, IDictionary serializedAdditionalRawData) : base(projectKind, location, language, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownDocumentEvaluationResult() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs new file mode 100644 index 000000000000..d8bec44da2be --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + internal partial class UnknownEvaluationSummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EvaluationSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationSummary(document.RootElement, options); + } + + internal static UnknownEvaluationSummary DeserializeUnknownEvaluationSummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + EvaluationDetails evaluationOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationOptions"u8)) + { + evaluationOptions = EvaluationDetails.DeserializeEvaluationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownEvaluationSummary(projectKind, evaluationOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support writing '{options.Format}' format."); + } + } + + EvaluationSummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEvaluationSummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationSummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownEvaluationSummary FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownEvaluationSummary(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.cs new file mode 100644 index 000000000000..11bd4629143a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownEvaluationSummary.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Unknown version of EvaluationSummary. + internal partial class UnknownEvaluationSummary : EvaluationSummary + { + /// Initializes a new instance of . + /// Represents the project type that the evaluation ran on. + /// Represents the options used running the evaluation. + /// Keeps track of any properties unknown to the library. + internal UnknownEvaluationSummary(ProjectKind projectKind, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) : base(projectKind, evaluationOptions, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownEvaluationSummary() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs new file mode 100644 index 000000000000..90a43b0d5610 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + internal partial class UnknownExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + + internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectKind projectKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectKind"u8)) + { + projectKind = new ProjectKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExportedProjectAssets(projectKind, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support writing '{options.Format}' format."); + } + } + + ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExportedProjectAssets(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownExportedProjectAssets FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownExportedProjectAssets(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs new file mode 100644 index 000000000000..590bfa73caf5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text.Authoring.Models +{ + /// Unknown version of ExportedProjectAssets. + internal partial class UnknownExportedProjectAssets : ExportedProjectAssets + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownExportedProjectAssets(ProjectKind projectKind, IDictionary serializedAdditionalRawData) : base(projectKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExportedProjectAssets() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs new file mode 100644 index 000000000000..9a10c2fd530f --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/TextAnalysisAuthoring.cs @@ -0,0 +1,6705 @@ +// 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; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.AI.Language.Text.Authoring.Models; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Language.Text.Authoring +{ + // Data plane generated sub-client. + /// The TextAnalysisAuthoring sub-client. + public partial class TextAnalysisAuthoring + { + 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; + + /// 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 TextAnalysisAuthoring for mocking. + protected TextAnalysisAuthoring() + { + } + + /// Initializes a new instance of TextAnalysisAuthoring. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The key credential to copy. + /// The token credential to copy. + /// Supported Cognitive Services endpoint e.g., https://<resource-name>.api.cognitiveservices.azure.com. + /// The API version to use for this operation. + internal TextAnalysisAuthoring(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _keyCredential = keyCredential; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectAsync(projectName, context).ConfigureAwait(false); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// Gets the details of a project. + /// The new project name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProject(projectName, context); + return Response.FromValue(ProjectMetadata.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project 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 GetProjectAsync(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a project. + /// + /// + /// + /// 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 new project 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 GetProject(string projectName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProject"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectRequest(projectName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] The most basic operation that applies to a resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project 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 response returned from the service. + /// + public virtual async Task CreateProjectAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] The most basic operation that applies to a resource. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project 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 response returned from the service. + /// + public virtual Response CreateProject(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CopyProjectAuthorizationAsync(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CopyProjectAuthorizationAsync(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// Generates a copy project operation authorization to the current target Azure resource. + /// The new project name. + /// Represents the project kind. + /// The name of the storage container. + /// Whether to allow an existing project to be overwritten using the resulting copy authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CopyProjectAuthorization(string projectName, ProjectKind projectKind, string storageInputContainerName = null, bool? allowOverwrite = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + CopyProjectAuthorizationRequest copyProjectAuthorizationRequest = new CopyProjectAuthorizationRequest(projectKind, storageInputContainerName, allowOverwrite, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CopyProjectAuthorization(projectName, copyProjectAuthorizationRequest.ToRequestContent(), context); + return Response.FromValue(CopyProjectDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure 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 new project 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 response returned from the service. + /// + public virtual async Task CopyProjectAuthorizationAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Generates a copy project operation authorization to the current target Azure 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 new project 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 response returned from the service. + /// + public virtual Response CopyProjectAuthorization(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProjectAuthorization"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectAuthorizationRequest(projectName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCopyProjectStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCopyProjectStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an existing copy project job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCopyProjectStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCopyProjectStatus(projectName, jobId, context); + return Response.FromValue(CopyProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetCopyProjectStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing copy project job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetCopyProjectStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetCopyProjectStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCopyProjectStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentAsync(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentAsync(projectName, deploymentName, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// Gets the details of a deployment. + /// The new project name. + /// Represents deployment name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeployment(string projectName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeployment(projectName, deploymentName, context); + return Response.FromValue(ProjectDeployment.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetDeploymentAsync(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a deployment. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetDeployment(string projectName, string deploymentName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(projectName, deploymentName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentDeleteFromResourcesStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing delete deployment from specific resources job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentDeleteFromResourcesStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentDeleteFromResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentDeleteFromResourcesStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing delete deployment from specific resources job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentDeleteFromResourcesStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentDeleteFromResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentDeleteFromResourcesStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentStatusAsync(projectName, deploymentName, jobId, context).ConfigureAwait(false); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// Gets the status of an existing deployment job. + /// The new project name. + /// Represents deployment name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeploymentStatus(string projectName, string deploymentName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeploymentStatus(projectName, deploymentName, jobId, context); + return Response.FromValue(DeploymentJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentStatusAsync(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing deployment job. + /// + /// + /// + /// 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 new project name. + /// Represents deployment name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetDeploymentStatus(string projectName, string deploymentName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetDeploymentStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentStatusRequest(projectName, deploymentName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSwapDeploymentsStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSwapDeploymentsStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// Gets the status of an existing swap deployment job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSwapDeploymentsStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSwapDeploymentsStatus(projectName, jobId, context); + return Response.FromValue(SwapDeploymentsJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetSwapDeploymentsStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing swap deployment job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetSwapDeploymentsStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetSwapDeploymentsStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSwapDeploymentsStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportStatus(projectName, jobId, context); + return Response.FromValue(ExportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an export job. Once job completes, returns the project metadata, and assets. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// Gets the details of an exported model. + /// The new project name. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModel(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModel(projectName, exportedModelName, context); + return Response.FromValue(ExportedTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModelAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModel(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelJobStatusAsync(projectName, exportedModelName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// Gets the status for an existing job to create or update an exported model. + /// The new project name. + /// The exported model name. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelJobStatus(projectName, exportedModelName, jobId, context); + return Response.FromValue(ExportedModelJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetExportedModelJobStatusAsync(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an existing job to create or update an exported 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. + /// + /// + /// + /// + /// The new project name. + /// The exported model name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetExportedModelJobStatus(string projectName, string exportedModelName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelJobStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelJobStatusRequest(projectName, exportedModelName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details and URL needed to download the exported model. + /// The name of the project to use. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetExportedModelManifestAsync(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExportedModelManifestAsync(projectName, exportedModelName, context).ConfigureAwait(false); + return Response.FromValue(ExportedModelManifest.FromResponse(response), response); + } + + /// Gets the details and URL needed to download the exported model. + /// The name of the project to use. + /// The exported model name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetExportedModelManifest(string projectName, string exportedModelName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExportedModelManifest(projectName, exportedModelName, context); + return Response.FromValue(ExportedModelManifest.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details and URL needed to download the exported 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. + /// + /// + /// + /// + /// The name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModelManifestAsync(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelManifest"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelManifestRequest(projectName, exportedModelName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details and URL needed to download the exported 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. + /// + /// + /// + /// + /// The name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetExportedModelManifest(string projectName, string exportedModelName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetExportedModelManifest"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExportedModelManifestRequest(projectName, exportedModelName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetImportStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetImportStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// Gets the status for an import. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetImportStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetImportStatus(projectName, jobId, context); + return Response.FromValue(ImportProjectJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetImportStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an import. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetImportStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainedModelAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainedModelAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// Gets the details of a trained model. + /// The new project name. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainedModel(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainedModel(projectName, trainedModelLabel, context); + return Response.FromValue(ProjectTrainedModel.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the details of a trained 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. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the details of a trained 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. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainedModel(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainedModelRequest(projectName, trainedModelLabel, 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 an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteTrainedModelAsync(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, 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 an existing trained model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The new project name. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteTrainedModel(string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteTrainedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTrainedModelRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEvaluationStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// Gets the status for an evaluation job. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEvaluationStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(EvaluationJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetEvaluationStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for an evaluation job. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetEvaluationStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetEvaluationStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetModelEvaluationSummaryAsync(projectName, trainedModelLabel, context).ConfigureAwait(false); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// The name of the project to use. + /// The trained model label. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetModelEvaluationSummary(string projectName, string trainedModelLabel, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetModelEvaluationSummary(projectName, trainedModelLabel, context); + return Response.FromValue(EvaluationSummary.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetModelEvaluationSummaryAsync(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the model e.g., F1, Precision, Recall, etc. + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetModelEvaluationSummary(string projectName, string trainedModelLabel, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetModelEvaluationSummary"); + scope.Start(); + try + { + using HttpMessage message = CreateGetModelEvaluationSummaryRequest(projectName, trainedModelLabel, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetLoadSnapshotStatusAsync(projectName, trainedModelLabel, jobId, context).ConfigureAwait(false); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// Gets the status for loading a snapshot. + /// The new project name. + /// The trained model label. + /// The job ID. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetLoadSnapshotStatus(projectName, trainedModelLabel, jobId, context); + return Response.FromValue(LoadSnapshotJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetLoadSnapshotStatusAsync(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for loading a snapshot. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or 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 GetLoadSnapshotStatus(string projectName, string trainedModelLabel, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetLoadSnapshotStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetLoadSnapshotStatusRequest(projectName, trainedModelLabel, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAssignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(AssignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing assign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAssignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAssignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(AssignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetAssignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing assign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetAssignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetAssignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAssignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status of an existing unassign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetUnassignDeploymentResourcesStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(UnassignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// Gets the status of an existing unassign deployment resources job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetUnassignDeploymentResourcesStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetUnassignDeploymentResourcesStatus(projectName, jobId, context); + return Response.FromValue(UnassignDeploymentResourcesJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetUnassignDeploymentResourcesStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status of an existing unassign deployment resources job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetUnassignDeploymentResourcesStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTrainingStatusAsync(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTrainingStatusAsync(projectName, jobId, context).ConfigureAwait(false); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// Gets the status for a training job. + /// The new project name. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTrainingStatus(string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTrainingStatus(projectName, jobId, context); + return Response.FromValue(TrainingJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainingStatusAsync(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a training job. + /// + /// + /// + /// 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 new project name. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 GetTrainingStatus(string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetProjectDeletionStatusAsync(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetProjectDeletionStatusAsync(jobId, context).ConfigureAwait(false); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// Gets the status for a project deletion job. + /// The job ID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetProjectDeletionStatus(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetProjectDeletionStatus(jobId, context); + return Response.FromValue(ProjectDeletionJobState.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatusAsync(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the status for a project deletion job. + /// + /// + /// + /// 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 job ID. + /// 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 GetProjectDeletionStatus(string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(jobId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetProjectsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the existing projects. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetProjects(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetProjectsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the existing projects. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetProjects(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetProjectsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetProjects", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the deployments belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeployments(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeployments(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeployments", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetExportedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the exported models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetExportedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetExportedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the exported models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetExportedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetExportedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetExportedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainedModelsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Lists the trained models belonging to a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainedModels(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainedModelsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the trained models belonging to a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainedModels(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainedModelsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainedModels", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DocumentEvaluationResult.DeserializeDocumentEvaluationResult(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// The new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetModelEvaluationResults(string projectName, string trainedModelLabel, StringIndexType stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DocumentEvaluationResult.DeserializeDocumentEvaluationResult(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// 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 GetModelEvaluationResultsAsync(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process. + /// + /// + /// + /// 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 new project name. + /// The trained model label. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// 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 GetModelEvaluationResults(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetModelEvaluationResultsRequest(projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetModelEvaluationResults", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetDeploymentResourcesAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the deployments resources assigned to the project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetDeploymentResources(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentResourcesAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments resources assigned to the project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetDeploymentResources(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentResourcesRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetDeploymentResources", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTrainingJobsAsync(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the non-expired training jobs created for a project. + /// The new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTrainingJobs(string projectName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainingJobsAsync(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the non-expired training jobs created for a project. + /// + /// + /// + /// 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 new project name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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 GetTrainingJobs(string projectName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingJobsRequest(projectName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingJobs", "value", "nextLink", context); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetAssignedResourceDeploymentsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetAssignedResourceDeployments(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetAssignedResourceDeploymentsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the deployments to which an Azure resource is assigned. This doesn't return deployments belonging to projects owned by this resource. It only returns deployments belonging to projects owned by other resources. + /// + /// + /// + /// 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetAssignedResourceDeployments(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAssignedResourceDeploymentsRequest(maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetAssignedResourceDeployments", "value", "nextLink", context); + } + + /// Lists the supported languages. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetSupportedLanguagesAsync(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// Lists the supported languages. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetSupportedLanguages(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported languages. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetSupportedLanguagesAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported languages. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetSupportedLanguages(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedLanguages", "value", "nextLink", context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetSupportedPrebuiltEntitiesAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The cancellation token to use. + /// + public virtual Pageable GetSupportedPrebuiltEntities(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 GetSupportedPrebuiltEntitiesAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the supported prebuilt entities that can be used while creating composed entities. + /// + /// + /// + /// 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 GetSupportedPrebuiltEntities(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetSupportedPrebuiltEntities", "value", "nextLink", context); + } + + /// Lists the support training config version for a given project type. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetTrainingConfigVersionsAsync(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// Lists the support training config version for a given project type. + /// The project kind, default value is CustomSingleLabelClassification. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetTrainingConfigVersions(ProjectKind? projectKind = null, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind?.ToString(), maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind?.ToString(), maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetTrainingConfigVersionsAsync(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists the support training config version for a given project type. + /// + /// + /// + /// 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 project kind, default value is CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification" | "CustomMultiLabelClassification" | "CustomEntityRecognition" | "CustomAbstractiveSummarization" | "CustomHealthcare" | "CustomTextSentiment". + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 GetTrainingConfigVersions(string projectKind, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, maxpagesize, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "TextAnalysisAuthoring.GetTrainingConfigVersions", "value", "nextLink", context); + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 DeleteProjectAsync(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil).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 a project. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 DeleteProject(WaitUntil waitUntil, string projectName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Copies an existing project to another Azure resource. + /// 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 name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task CopyProjectAsync(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CopyProjectAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Copies an existing project to another Azure resource. + /// 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 name of the project to use. + /// The copy project info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation CopyProject(WaitUntil waitUntil, string projectName, CopyProjectDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CopyProject(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Copies an existing project to another Azure 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. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 CopyProjectAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Copies an existing project to another Azure 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. + /// + /// + /// + /// + /// 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 name of the project to use. + /// 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 CopyProject(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CopyProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to export a project's data. + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ExportAsync(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return await ExportAsync(waitUntil, projectName, stringIndexType.ToString(), assetKind, trainedModelLabel, context).ConfigureAwait(false); + } + + /// Triggers a job to export a project's data. + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Export(WaitUntil waitUntil, string projectName, StringIndexType stringIndexType, string assetKind = null, string trainedModelLabel = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + RequestContext context = FromCancellationToken(cancellationToken); + return Export(waitUntil, projectName, stringIndexType.ToString(), assetKind, trainedModelLabel, context); + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// 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 ExportAsync(WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, assetKind, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to export a project's data. + /// + /// + /// + /// 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 name of the project to use. + /// Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit". + /// Kind of asset to export. + /// Trained model label to export. If the trainedModelLabel is null, the default behavior is to export the current working copy. + /// 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 Export(WaitUntil waitUntil, string projectName, string stringIndexType, string assetKind = null, string trainedModelLabel = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(stringIndexType, nameof(stringIndexType)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, assetKind, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Export", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// 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 name of the project to use. + /// The project data to import. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task ImportAsync(WaitUntil waitUntil, string projectName, ExportedProject body, string format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await ImportAsync(waitUntil, projectName, content, format, context).ConfigureAwait(false); + } + + /// Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// 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 name of the project to use. + /// The project data to import. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Import(WaitUntil waitUntil, string projectName, ExportedProject body, string format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return Import(waitUntil, projectName, content, format, context); + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// 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 ImportAsync(WaitUntil waitUntil, string projectName, RequestContent content, string format = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, format, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced. + /// + /// + /// + /// 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 name of the project to use. + /// The content to send as the body of the request. + /// The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json. + /// 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 Import(WaitUntil waitUntil, string projectName, RequestContent content, string format = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, format, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Import", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a training job for a project. + /// 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 name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> TrainAsync(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await TrainAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.Train"); + } + + /// Triggers a training job for a project. + /// 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 name of the project to use. + /// The training input parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation Train(WaitUntil waitUntil, string projectName, TrainingJobDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = Train(waitUntil, projectName, content, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.Train"); + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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> TrainAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a training job for a project. + /// + /// + /// + /// 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 name of the project to use. + /// 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 Train(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.Train", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new deployment or replaces an existing one. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeployProjectAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Creates a new deployment or replaces an existing one. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The new deployment info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, CreateDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeployProject(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeployProjectAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new deployment or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeployProject(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeployProject", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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 a project deployment. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteDeploymentAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil).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 a project deployment. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteDeployment(WaitUntil waitUntil, string projectName, string deploymentName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeployment", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a project deployment from the specified assigned resources. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await DeleteDeploymentFromResourcesAsync(waitUntil, projectName, deploymentName, content, context).ConfigureAwait(false); + } + + /// Deletes a project deployment from the specified assigned resources. + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// The options for deleting the deployment. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, DeleteDeploymentDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return DeleteDeploymentFromResources(waitUntil, projectName, deploymentName, content, context); + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeleteDeploymentFromResourcesAsync(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Deletes a project deployment from the specified assigned resources. + /// + /// + /// + /// 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 name of the project to use. + /// The name of the specific deployment of the project to use. + /// 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. + /// or 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 DeleteDeploymentFromResources(WaitUntil waitUntil, string projectName, string deploymentName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteDeploymentFromResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Swaps two existing deployments with each other. + /// 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 name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await SwapDeploymentsAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Swaps two existing deployments with each other. + /// 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 name of the project to use. + /// The job object to swap two deployments. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation SwapDeployments(WaitUntil waitUntil, string projectName, SwapDeploymentsDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return SwapDeployments(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// 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 SwapDeploymentsAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Swaps two existing deployments with each other. + /// + /// + /// + /// 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 name of the project to use. + /// 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 SwapDeployments(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.SwapDeployments", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a new exported model or replaces an existing one. + /// 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 name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await CreateOrUpdateExportedModelAsync(waitUntil, projectName, exportedModelName, content, context).ConfigureAwait(false); + } + + /// Creates a new exported model or replaces an existing one. + /// 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 name of the project to use. + /// The exported model name. + /// The exported model info. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, ExportedModelDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return CreateOrUpdateExportedModel(waitUntil, projectName, exportedModelName, content, context); + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported 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. + /// or 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 CreateOrUpdateExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a new exported model or replaces an existing one. + /// + /// + /// + /// 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 name of the project to use. + /// The exported 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. + /// or 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 CreateOrUpdateExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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 an existing exported model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteExportedModelAsync(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil).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 an existing exported model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The exported model name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 DeleteExportedModel(WaitUntil waitUntil, string projectName, string exportedModelName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.DeleteExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers evaluation operation on a trained 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. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await EvaluateModelAsync(waitUntil, projectName, trainedModelLabel, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel"); + } + + /// Triggers evaluation operation on a trained 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. + /// The name of the project to use. + /// The trained model label. + /// The training input parameters. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, EvaluationDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = EvaluateModel(waitUntil, projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationJobState, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel"); + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained 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 name of the project to use. + /// The trained model label. + /// 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. + /// or 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> EvaluateModelAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers evaluation operation on a trained 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 name of the project to use. + /// The trained model label. + /// 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. + /// or 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 EvaluateModel(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.EvaluateModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + 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] Long-running operation. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 LoadSnapshotAsync(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil).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] Long-running operation. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// 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 name of the project to use. + /// The trained model label. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 LoadSnapshot(WaitUntil waitUntil, string projectName, string trainedModelLabel, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.LoadSnapshot", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// 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 name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await AssignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory. + /// 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 name of the project to use. + /// The new project resources info. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation AssignDeploymentResources(WaitUntil waitUntil, string projectName, AssignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return AssignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// 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 AssignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Assign new Azure resources to a project to allow deploying new deployments to them. This API is available only via AAD authentication and not supported via subscription key authentication. For more details about AAD authentication, check here: https://learn.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-azure-active-directory + /// + /// + /// + /// 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 name of the project to use. + /// 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 AssignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.AssignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// 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 name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return await UnassignDeploymentResourcesAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + } + + /// Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// 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 name of the project to use. + /// The info for the deployment resources to be deleted. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Operation UnassignDeploymentResources(WaitUntil waitUntil, string projectName, UnassignDeploymentResourcesDetails body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + return UnassignDeploymentResources(waitUntil, projectName, content, context); + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// 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 UnassignDeploymentResourcesAsync(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes existing deployments assigned to them. + /// + /// + /// + /// 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 name of the project to use. + /// 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 UnassignDeploymentResources(WaitUntil waitUntil, string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Triggers a cancellation for a running training job. + /// 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 name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await CancelTrainingJobAsync(waitUntil, projectName, jobId, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob"); + } + + /// Triggers a cancellation for a running training job. + /// 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 name of the project to use. + /// The job ID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Operation CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = CancelTrainingJob(waitUntil, projectName, jobId, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingJobState, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob"); + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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> CancelTrainingJobAsync(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Triggers a cancellation for a running training job. + /// + /// + /// + /// 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 name of the project to use. + /// The job ID. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or 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 CancelTrainingJob(WaitUntil waitUntil, string projectName, string jobId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("TextAnalysisAuthoring.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "TextAnalysisAuthoring.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetProjectsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateProjectRequest(string projectName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteProjectRequest(string projectName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCopyProjectAuthorizationRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:authorize-copy", 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 CreateCopyProjectRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:copy", 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 CreateExportRequest(string projectName, string stringIndexType, string assetKind, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:export", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (assetKind != null) + { + uri.AppendQuery("assetKind", assetKind, true); + } + if (trainedModelLabel != null) + { + uri.AppendQuery("trainedModelLabel", trainedModelLabel, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateImportRequest(string projectName, RequestContent content, string format, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:import", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (format != null) + { + request.Headers.Add("format", format); + } + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateTrainRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/:train", 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 CreateGetCopyProjectStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/copy/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentRequest(string projectName, string deploymentName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeployProjectRequest(string projectName, string deploymentName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + 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 CreateDeleteDeploymentRequest(string projectName, string deploymentName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteDeploymentFromResourcesRequest(string projectName, string deploymentName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/:delete-from-resources", 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 CreateGetDeploymentDeleteFromResourcesStatusRequest(string projectName, string deploymentName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/delete-from-resources/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentStatusRequest(string projectName, string deploymentName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSwapDeploymentsRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/:swap", 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 CreateGetSwapDeploymentsStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/deployments/swap/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/export/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelRequest(string projectName, string exportedModelName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateExportedModelRequest(string projectName, string exportedModelName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + 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 CreateDeleteExportedModelRequest(string projectName, string exportedModelName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelJobStatusRequest(string projectName, string exportedModelName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelManifestRequest(string projectName, string exportedModelName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/exported-models/", false); + uri.AppendPath(exportedModelName, true); + uri.AppendPath("/manifest", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetImportStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/import/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteTrainedModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateEvaluateModelRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:evaluate", 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 CreateLoadSnapshotRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/:load-snapshot", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEvaluationStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluate/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsRequest(string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/result", false); + uri.AppendQuery("stringIndexType", stringIndexType, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationSummaryRequest(string projectName, string trainedModelLabel, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/evaluation/summary-result", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLoadSnapshotStatusRequest(string projectName, string trainedModelLabel, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(trainedModelLabel, true); + uri.AppendPath("/load-snapshot/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAssignDeploymentResourcesRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:assign", 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 CreateUnassignDeploymentResourcesRequest(string projectName, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/:unassign", 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 CreateGetAssignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/assign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetUnassignDeploymentResourcesStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/resources/unassign/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsRequest(string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingStatusRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCancelTrainingJobRequest(string projectName, string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/train/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/:cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectDeletionStatusRequest(string jobId, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/global/deletion-jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsRequest(int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/global/deployments/resources", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesRequest(string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/global/languages", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (projectKind != null) + { + uri.AppendQuery("projectKind", projectKind, true); + } + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesRequest(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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/global/prebuilt-entities", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsRequest(string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendPath("/authoring/analyze-text/projects/global/training-config-versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (projectKind != null) + { + uri.AppendQuery("projectKind", projectKind, true); + } + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetProjectsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExportedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainedModelsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetModelEvaluationResultsNextPageRequest(string nextLink, string projectName, string trainedModelLabel, string stringIndexType, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentResourcesNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingJobsNextPageRequest(string nextLink, string projectName, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAssignedResourceDeploymentsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedLanguagesNextPageRequest(string nextLink, string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSupportedPrebuiltEntitiesNextPageRequest(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("/language", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTrainingConfigVersionsNextPageRequest(string nextLink, string projectKind, int? maxCount, int? skip, int? maxpagesize, 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("/language", 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 _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + + private TrainingJobResult FetchTrainingJobResultFromTrainingJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return TrainingJobResult.DeserializeTrainingJobResult(resultJsonElement); + } + + private EvaluationJobResult FetchEvaluationJobResultFromEvaluationJobState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return EvaluationJobResult.DeserializeEvaluationJobResult(resultJsonElement); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Properties/AssemblyInfo.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5a3f23c6c4fd --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.AI.Language.Text.Authoring.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj new file mode 100644 index 000000000000..35ad37e67673 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Azure.AI.Language.Text.Authoring.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs new file mode 100644 index 000000000000..8dec7c7ae587 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tests/Generated/Samples/Samples_TextAnalysisAuthoring.cs @@ -0,0 +1,6356 @@ +// 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.AI.Language.Text.Authoring.Models; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Text.Authoring.Samples +{ + public partial class Samples_TextAnalysisAuthoring + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProject(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_CreateProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_CreateProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_CreateProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = client.CreateProject("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_CreateProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }); + Response response = await client.CreateProjectAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = client.CopyProjectAuthorization("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = await client.CopyProjectAuthorizationAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("targetProjectName").ToString()); + Console.WriteLine(result.GetProperty("accessToken").ToString()); + Console.WriteLine(result.GetProperty("expiresAt").ToString()); + Console.WriteLine(result.GetProperty("targetResourceId").ToString()); + Console.WriteLine(result.GetProperty("targetResourceRegion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.CopyProjectAuthorization("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProjectAuthorization_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.CopyProjectAuthorizationAsync("", ProjectKind.CustomSingleLabelClassification, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringCopyProjectJobState_GetCopyProjectStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeployment("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployment_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetDeploymentStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetDeploymentStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetSwapDeploymentsStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("resultUrl").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportProjectJobState_GetExportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelJobStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("modelFiles")[0].GetProperty("contentUri").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetExportedModelManifest("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetExportedModelManifest_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetExportedModelManifestAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetImportStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainedModel("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainedModelAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.DeleteTrainedModel("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_DeleteTrainedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.DeleteTrainedModelAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetEvaluationStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringEvaluationJobState_GetEvaluationStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_GetModelEvaluationSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetLoadSnapshotStatus("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetAssignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringUnassignDeploymentResourcesJobState_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetTrainingStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeletionJobState_GetProjectDeletionStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetProjects(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetProjectsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("storageInputContainerName").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("confidenceThreshold").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("amlProjectPath").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("isLabelingLocked").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("runGptPredictions").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("gptPredictiveLookahead").ToString()); + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("multilingual").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectMetadata item in client.GetProjects(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectMetadata_GetProjects_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeployments("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("assignedResources")[0].GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectDeployment item in client.GetDeployments("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectDeployment_GetDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetExportedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetExportedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("exportedModelName").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastExportedModelDateTime").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ExportedTrainedModel item in client.GetExportedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringExportedTrainedModel_GetExportedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainedModels("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainedModelsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("modelId").ToString()); + Console.WriteLine(result.GetProperty("lastTrainedDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastTrainingDurationInSeconds").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + Console.WriteLine(result.GetProperty("modelTrainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("hasSnapshot").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (ProjectTrainedModel item in client.GetTrainedModels("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringProjectTrainedModel_GetTrainedModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit")) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetModelEvaluationResults("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetModelEvaluationResultsAsync("", "", "Utf16CodeUnit", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectKind").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("language").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (DocumentEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringDocumentEvaluationResult_GetModelEvaluationResults_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (DocumentEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetDeploymentResources("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentResourcesAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("azureResourceId").ToString()); + Console.WriteLine(result.GetProperty("region").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedDeploymentResource item in client.GetDeploymentResources("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedDeploymentResource_GetDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingJobs("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingJobsAsync("", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("createdDateTime").ToString()); + Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); + Console.WriteLine(result.GetProperty("expirationDateTime").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("result").GetProperty("estimatedEndDateTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingJobState item in client.GetTrainingJobs("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingJobState_GetTrainingJobs_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingJobState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetAssignedResourceDeployments(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetAssignedResourceDeployments(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetAssignedResourceDeploymentsAsync(1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("projectName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentName").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("lastDeployedDateTime").ToString()); + Console.WriteLine(result.GetProperty("deploymentsMetadata")[0].GetProperty("deploymentExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedLanguages(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (SupportedLanguage item in client.GetSupportedLanguages()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedLanguages("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("languageName").ToString()); + Console.WriteLine(result.GetProperty("languageCode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (SupportedLanguage item in client.GetSupportedLanguages(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examples").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingConfigVersions(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (BinaryData item in client.GetTrainingConfigVersions("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("CustomSingleLabelClassification", 1234, 1234, 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("modelExpirationDate").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(projectKind: ProjectKind.CustomSingleLabelClassification, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = client.CopyProject(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "CustomSingleLabelClassification", + targetProjectName = "", + accessToken = "", + expiresAt = "2022-05-10T18:57:31.2311892Z", + targetResourceId = "", + targetResourceRegion = "", + }); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CopyProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CopyProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CopyProjectDetails body = new CopyProjectDetails( + ProjectKind.CustomSingleLabelClassification, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Export_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Export_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + projectName = "", + language = "", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); + Operation operation = client.Import(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "")); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { +new +{ +summaryLocation = "", +location = "", +language = "", +dataset = "", +} + }, + projectKind = "CustomAbstractiveSummarization", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + projectFileVersion = "", + stringIndexType = "Utf16CodeUnit", + metadata = new + { + projectKind = "CustomSingleLabelClassification", + storageInputContainerName = "", + settings = new + { + confidenceThreshold = 123.45F, + amlProjectPath = "", + isLabelingLocked = true, + runGptPredictions = true, + gptPredictiveLookahead = 1234, + }, + projectName = "", + multilingual = true, + description = "", + language = "", + }, + assets = new + { + documents = new object[] + { +new +{ +summaryLocation = "", +location = "", +language = "", +dataset = "", +} + }, + projectKind = "CustomAbstractiveSummarization", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Import_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") + { + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", + }) + { + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") +{ +Location = "", +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = client.Import(WaitUntil.Completed, "", body, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Import_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedProject body = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(ProjectKind.CustomSingleLabelClassification, "", "", "") + { + Settings = new ProjectSettings + { + ConfidenceThreshold = 123.45F, + AmlProjectPath = "", + IsLabelingLocked = true, + RunGptPredictions = true, + GptPredictiveLookahead = 1234, + }, + Multilingual = true, + Description = "", + }) + { + Assets = new ExportedCustomAbstractiveSummarizationProjectAssets + { + Documents = {new ExportedCustomAbstractiveSummarizationDocument("") +{ +Location = "", +Language = "", +Dataset = "", +}}, + }, + }; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", body, format: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", ""); + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", ""); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, + }); + Operation operation = client.Train(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + modelLabel = "", + trainingConfigVersion = "", + evaluationOptions = new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }, + dataGenerationSettings = new + { + enableDataGeneration = true, + dataGenerationConnectionInfo = new + { + kind = "azureOpenAI", + resourceId = "", + deploymentName = "", + }, + }, + }); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_Train_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", "") + { + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), + }; + Operation operation = client.Train(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_Train_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + TrainingJobDetails body = new TrainingJobDetails("", "") + { + EvaluationOptions = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + DataGenerationSettings = new DataGenerationSettings(true, new DataGenerationConnectionInfo("", "")), + }; + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", body); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails(""); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeployProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeployProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + CreateDeploymentDetails body = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails(); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteDeploymentFromResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + DeleteDeploymentDetails body = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + firstDeploymentName = "", + secondDeploymentName = "", + }); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_SwapDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + SwapDeploymentsDetails body = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + trainedModelLabel = "", + }); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CreateOrUpdateExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + ExportedModelDetails body = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_DeleteExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_DeleteExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new object()); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails(); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + kind = "percentage", + trainingSplitPercentage = 1234, + testingSplitPercentage = 1234, + }); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", content); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("trainingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("evaluationOptions").GetProperty("testingSplitPercentage").ToString()); + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("percentComplete").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_EvaluateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + EvaluationDetails body = new EvaluationDetails + { + Kind = EvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", body); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_LoadSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_LoadSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_LoadSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_LoadSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + resourcesMetadata = new object[] + { +new +{ +azureResourceId = "", +customDomain = "", +region = "", +} + }, + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_AssignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + AssignDeploymentResourcesDetails body = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + assignedResourceIds = new object[] + { +"" + }, + }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_UnassignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + UnassignDeploymentResourcesDetails body = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", "", null); + BinaryData responseData = operation.Value; + + JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("modelLabel").ToString()); + Console.WriteLine(result.GetProperty("trainingConfigVersion").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("trainingStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("percentComplete").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("startDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("endDateTime").ToString()); + Console.WriteLine(result.GetProperty("evaluationStatus").GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("estimatedEndDateTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_TextAnalysisAuthoring_CancelTrainingJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisAuthoring client = new AuthoringClient(endpoint, credential).GetTextAnalysisAuthoringClient(apiVersion: "2024-11-15-preview"); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml new file mode 100644 index 000000000000..4706b119e8e5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/cognitiveservices/Language.AnalyzeText-authoring +commit: 09d4b1d3355e728ae0de3751b0be6a604a84e1c8 +repo: Azure/azure-rest-api-specs +additionalDirectories: