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 deleted file mode 100644 index d619718162b9..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AnalyzeConversationAuthoring.cs +++ /dev/null @@ -1,6630 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingJobState.DeserializeTrainingJobState(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AnalyzeConversationAuthoring.GetExportedModels", "value", "nextLink", maxpagesize, 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 index 9b8fcdf03b96..6abc5746df22 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/AuthoringClient.cs @@ -6,13 +6,16 @@ #nullable disable using System; +using System.Threading; +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 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>. + /// 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://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview">https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>. public partial class AuthoringClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; @@ -21,6 +24,7 @@ public partial class AuthoringClient 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; } @@ -64,6 +68,7 @@ public AuthoringClient(Uri endpoint, AzureKeyCredential credential, AuthoringCli _keyCredential = credential; _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); _endpoint = endpoint; + _apiVersion = options.Version; } /// Initializes a new instance of AuthoringClient. @@ -81,16 +86,1461 @@ public AuthoringClient(Uri endpoint, TokenCredential credential, AuthoringClient _tokenCredential = credential; _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); _endpoint = endpoint; + _apiVersion = options.Version; } - /// 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") + /// 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.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - return new AnalyzeConversationAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion); + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(projectName, maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectDeployment.DeserializeProjectDeployment(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeployments", "value", "nextLink", maxpagesize, 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 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectMetadata.DeserializeProjectMetadata(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetProjects", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetProjectsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetProjects", "value", "nextLink", maxpagesize, context); + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// 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(AnalyzeConversationAuthoringProjectKind projectKind, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedLanguages", "value", "nextLink", maxpagesize, context); + } + + /// Lists the supported languages for the given project type. + /// The project kind. + /// 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(AnalyzeConversationAuthoringProjectKind projectKind, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SupportedLanguage.DeserializeSupportedLanguage(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedLanguages", "value", "nextLink", maxpagesize, context); + } + + /// + /// [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 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. + /// 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 = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedLanguages", "value", "nextLink", maxpagesize, context); + } + + /// + /// [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 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. + /// 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 = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedLanguagesRequest(projectKind, maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedLanguagesNextPageRequest(nextLink, projectKind, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedLanguages", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetAssignedResourceDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedProjectDeploymentsMetadata.DeserializeAssignedProjectDeploymentsMetadata(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetAssignedResourceDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetAssignedResourceDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAssignedResourceDeploymentsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetAssignedResourceDeployments", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AssignedDeploymentResource.DeserializeAssignedDeploymentResource(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeploymentResources", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentResourcesNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetDeploymentResources", "value", "nextLink", maxpagesize, context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 cancellation token to use. + /// + public virtual AsyncPageable GetSupportedPrebuiltEntitiesAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, string language = null, string multilingual = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(maxCount, skip, pageSizeHint, language, multilingual, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, language, multilingual, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedPrebuiltEntities", "value", "nextLink", maxpagesize, context); + } + + /// Lists the supported prebuilt entities that can be used while creating composed entities. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 cancellation token to use. + /// + public virtual Pageable GetSupportedPrebuiltEntities(int? maxCount = null, int? skip = null, int? maxpagesize = null, string language = null, string multilingual = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(maxCount, skip, pageSizeHint, language, multilingual, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, language, multilingual, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => PrebuiltEntity.DeserializePrebuiltEntity(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedPrebuiltEntities", "value", "nextLink", maxpagesize, 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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(int? maxCount, int? skip, int? maxpagesize, string language, string multilingual, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(maxCount, skip, pageSizeHint, language, multilingual, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, language, multilingual, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedPrebuiltEntities", "value", "nextLink", maxpagesize, 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 number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// 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 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(int? maxCount, int? skip, int? maxpagesize, string language, string multilingual, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedPrebuiltEntitiesRequest(maxCount, skip, pageSizeHint, language, multilingual, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedPrebuiltEntitiesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, language, multilingual, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetSupportedPrebuiltEntities", "value", "nextLink", maxpagesize, context); + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// 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(AnalyzeConversationAuthoringProjectKind projectKind, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingConfigVersions", "value", "nextLink", maxpagesize, context); + } + + /// Lists the support training config version for a given project type. + /// The project kind. + /// 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(AnalyzeConversationAuthoringProjectKind projectKind, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingConfigVersion.DeserializeTrainingConfigVersion(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingConfigVersions", "value", "nextLink", maxpagesize, 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. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// 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. + /// 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 = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingConfigVersions", "value", "nextLink", maxpagesize, 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. Allowed values: "Conversation" | "Orchestration" | "CustomConversationSummarization". + /// 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. + /// 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 = null, int? skip = null, int? maxpagesize = null, RequestContext context = null) + { + Argument.AssertNotNull(projectKind, nameof(projectKind)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTrainingConfigVersionsRequest(projectKind, maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingConfigVersionsNextPageRequest(nextLink, projectKind, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingConfigVersions", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TrainingOperationState.DeserializeTrainingOperationState(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TrainingOperationState.DeserializeTrainingOperationState(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainingJobsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainingJobs", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProjectTrainedModel.DeserializeProjectTrainedModel(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTrainedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetTrainedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExportedTrainedModel.DeserializeExportedTrainedModel(e), ClientDiagnostics, _pipeline, "AuthoringClient.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetExportedModels", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetExportedModelsNextPageRequest(nextLink, projectName, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AuthoringClient.GetExportedModels", "value", "nextLink", maxpagesize, context); + } + + private ConversationAuthoringDeployments _cachedConversationAuthoringDeployments; + private ConversationAuthoringProjects _cachedConversationAuthoringProjects; + private ConversationAuthoringModels _cachedConversationAuthoringModels; + + /// Initializes a new instance of ConversationAuthoringDeployments. + public virtual ConversationAuthoringDeployments GetConversationAuthoringDeploymentsClient() + { + return Volatile.Read(ref _cachedConversationAuthoringDeployments) ?? Interlocked.CompareExchange(ref _cachedConversationAuthoringDeployments, new ConversationAuthoringDeployments(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, _apiVersion), null) ?? _cachedConversationAuthoringDeployments; + } + + /// Initializes a new instance of ConversationAuthoringProjects. + public virtual ConversationAuthoringProjects GetConversationAuthoringProjectsClient() + { + return Volatile.Read(ref _cachedConversationAuthoringProjects) ?? Interlocked.CompareExchange(ref _cachedConversationAuthoringProjects, new ConversationAuthoringProjects(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, _apiVersion), null) ?? _cachedConversationAuthoringProjects; + } + + /// Initializes a new instance of ConversationAuthoringModels. + public virtual ConversationAuthoringModels GetConversationAuthoringModelsClient() + { + return Volatile.Read(ref _cachedConversationAuthoringModels) ?? Interlocked.CompareExchange(ref _cachedConversationAuthoringModels, new ConversationAuthoringModels(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, _apiVersion), null) ?? _cachedConversationAuthoringModels; + } + + 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 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 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-conversations/projects/global/languages", false); + uri.AppendQuery("projectKind", projectKind, 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 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-conversations/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 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 CreateGetSupportedPrebuiltEntitiesRequest(int? maxCount, int? skip, int? maxpagesize, string language, string multilingual, 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 (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); + } + if (language != null) + { + uri.AppendQuery("language", language, true); + } + if (multilingual != null) + { + uri.AppendQuery("multilingual", multilingual, 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-conversations/projects/global/training-config-versions", false); + uri.AppendQuery("projectKind", projectKind, 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 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 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 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 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 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 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 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 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 CreateGetSupportedPrebuiltEntitiesNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, string language, string multilingual, 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; + } + + 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 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 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 }); } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringDeployments.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringDeployments.cs new file mode 100644 index 000000000000..cbba39e860eb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringDeployments.cs @@ -0,0 +1,1729 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +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 ConversationAuthoringDeployments sub-client. + public partial class ConversationAuthoringDeployments + { + 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 ConversationAuthoringDeployments for mocking. + protected ConversationAuthoringDeployments() + { + } + + /// Initializes a new instance of ConversationAuthoringDeployments. + /// 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 ConversationAuthoringDeployments(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 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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.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(DeploymentDeleteFromResourcesOperationState.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(DeploymentDeleteFromResourcesOperationState.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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.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(DeploymentOperationState.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(DeploymentOperationState.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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.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(SwapDeploymentsOperationState.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(SwapDeploymentsOperationState.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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.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 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(DeploymentResourcesOperationState.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(DeploymentResourcesOperationState.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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.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(DeploymentResourcesOperationState.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(DeploymentResourcesOperationState.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("ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.GetUnassignDeploymentResourcesStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, jobId, context); + return _pipeline.ProcessMessage(message, context); + } + 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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringDeployments.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.SwapDeployments"); + scope.Start(); + try + { + using HttpMessage message = CreateSwapDeploymentsRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringDeployments.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.DeployProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeployProjectRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.DeleteDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentRequest(projectName, deploymentName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringDeployments.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.DeleteDeploymentFromResources"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteDeploymentFromResourcesRequest(projectName, deploymentName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.DeleteDeploymentFromResources", 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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringDeployments.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.AssignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateAssignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringDeployments.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.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("ConversationAuthoringDeployments.UnassignDeploymentResources"); + scope.Start(); + try + { + using HttpMessage message = CreateUnassignDeploymentResourcesRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringDeployments.UnassignDeploymentResources", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + 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 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; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringModels.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringModels.cs new file mode 100644 index 000000000000..2258d62df14c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringModels.cs @@ -0,0 +1,1686 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +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 ConversationAuthoringModels sub-client. + public partial class ConversationAuthoringModels + { + 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 ConversationAuthoringModels for mocking. + protected ConversationAuthoringModels() + { + } + + /// Initializes a new instance of ConversationAuthoringModels. + /// 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 ConversationAuthoringModels(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 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("ConversationAuthoringModels.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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(EvaluationOperationState.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(EvaluationOperationState.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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(LoadSnapshotOperationState.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(LoadSnapshotOperationState.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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 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("ConversationAuthoringModels.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("ConversationAuthoringModels.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(ExportedModelOperationState.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(ExportedModelOperationState.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("ConversationAuthoringModels.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("ConversationAuthoringModels.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 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "ConversationAuthoringModels.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType.ToString(), maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => UtteranceEvaluationResult.DeserializeUtteranceEvaluationResult(e), ClientDiagnostics, _pipeline, "ConversationAuthoringModels.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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" | "Utf8CodeUnit" | "Utf32CodeUnit". + /// 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ConversationAuthoringModels.GetModelEvaluationResults", "value", "nextLink", maxpagesize, 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" | "Utf8CodeUnit" | "Utf32CodeUnit". + /// 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, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetModelEvaluationResultsNextPageRequest(nextLink, projectName, trainedModelLabel, stringIndexType, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ConversationAuthoringModels.GetModelEvaluationResults", "value", "nextLink", maxpagesize, context); + } + + /// 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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await EvaluateModelAsync(waitUntil, projectName, trainedModelLabel, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationOperationState, ClientDiagnostics, "ConversationAuthoringModels.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(trainedModelLabel, nameof(trainedModelLabel)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = EvaluateModel(waitUntil, projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.Convert(response, FetchEvaluationJobResultFromEvaluationOperationState, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.EvaluateModel"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluateModelRequest(projectName, trainedModelLabel, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.LoadSnapshot"); + scope.Start(); + try + { + using HttpMessage message = CreateLoadSnapshotRequest(projectName, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.LoadSnapshot", 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("ConversationAuthoringModels.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.DeleteExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteExportedModelRequest(projectName, exportedModelName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(exportedModelName, nameof(exportedModelName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringModels.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.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("ConversationAuthoringModels.CreateOrUpdateExportedModel"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateExportedModelRequest(projectName, exportedModelName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringModels.CreateOrUpdateExportedModel", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + 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 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 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 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; + } + + 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 _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + + private EvaluationJobResult FetchEvaluationJobResultFromEvaluationOperationState(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/ConversationAuthoringProjects.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringProjects.cs new file mode 100644 index 000000000000..f7bdc5177ddc --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationAuthoringProjects.cs @@ -0,0 +1,1936 @@ +// 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 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 ConversationAuthoringProjects sub-client. + public partial class ConversationAuthoringProjects + { + 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 ConversationAuthoringProjects for mocking. + protected ConversationAuthoringProjects() + { + } + + /// Initializes a new instance of ConversationAuthoringProjects. + /// 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 ConversationAuthoringProjects(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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.CreateProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateProjectRequest(projectName, content, 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(ProjectDeletionOperationState.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(ProjectDeletionOperationState.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.GetProjectDeletionStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetProjectDeletionStatusRequest(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(ExportProjectOperationState.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(ExportProjectOperationState.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.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(ImportProjectOperationState.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(ImportProjectOperationState.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.GetImportStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetImportStatusRequest(projectName, jobId, 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> AuthorizeProjectCopyAsync(string projectName, AnalyzeConversationAuthoringProjectKind 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 AuthorizeProjectCopyAsync(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 AuthorizeProjectCopy(string projectName, AnalyzeConversationAuthoringProjectKind 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 = AuthorizeProjectCopy(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 AuthorizeProjectCopyAsync(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ConversationAuthoringProjects.AuthorizeProjectCopy"); + scope.Start(); + try + { + using HttpMessage message = CreateAuthorizeProjectCopyRequest(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 AuthorizeProjectCopy(string projectName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ConversationAuthoringProjects.AuthorizeProjectCopy"); + scope.Start(); + try + { + using HttpMessage message = CreateAuthorizeProjectCopyRequest(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(CopyProjectOperationState.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(CopyProjectOperationState.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.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 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(TrainingOperationState.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(TrainingOperationState.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("ConversationAuthoringProjects.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("ConversationAuthoringProjects.GetTrainingStatus"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTrainingStatusRequest(projectName, jobId, 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 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("ConversationAuthoringProjects.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.DeleteProject"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteProjectRequest(projectName, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.DeleteProject", 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, AnalyzeConversationAuthoringExportedProjectFormat? 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, AnalyzeConversationAuthoringExportedProjectFormat? 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" | "Utf8CodeUnit" | "Utf32CodeUnit". + /// 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("ConversationAuthoringProjects.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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" | "Utf8CodeUnit" | "Utf32CodeUnit". + /// 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("ConversationAuthoringProjects.Export"); + scope.Start(); + try + { + using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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 exportedProject, AnalyzeConversationAuthoringExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(exportedProject, nameof(exportedProject)); + + using RequestContent content = exportedProject.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 exportedProject, AnalyzeConversationAuthoringExportedProjectFormat? exportedProjectFormat = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(exportedProject, nameof(exportedProject)); + + using RequestContent content = exportedProject.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("ConversationAuthoringProjects.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.Import"); + scope.Start(); + try + { + using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.Import", 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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.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("ConversationAuthoringProjects.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.CopyProject"); + scope.Start(); + try + { + using HttpMessage message = CreateCopyProjectRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.CopyProject", 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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = await TrainAsync(waitUntil, projectName, content, context).ConfigureAwait(false); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingOperationState, ClientDiagnostics, "ConversationAuthoringProjects.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 details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(details, nameof(details)); + + using RequestContent content = details.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Operation response = Train(waitUntil, projectName, content, context); + return ProtocolOperationHelpers.Convert(response, FetchTrainingJobResultFromTrainingOperationState, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.Train"); + scope.Start(); + try + { + using HttpMessage message = CreateTrainRequest(projectName, content, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.Train", 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, FetchTrainingJobResultFromTrainingOperationState, ClientDiagnostics, "ConversationAuthoringProjects.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, FetchTrainingJobResultFromTrainingOperationState, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.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("ConversationAuthoringProjects.CancelTrainingJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCancelTrainingJobRequest(projectName, jobId, context); + return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "ConversationAuthoringProjects.CancelTrainingJob", OperationFinalStateVia.OperationLocation, context, waitUntil); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + 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 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 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 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 CreateAuthorizeProjectCopyRequest(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 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 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 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; + } + + 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 TrainingJobResult FetchTrainingJobResultFromTrainingOperationState(Response response) + { + var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("result"); + return TrainingJobResult.DeserializeTrainingJobResult(resultJsonElement); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationsAuthoringModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationsAuthoringModelFactory.cs index 0f7695000f64..7c78d4314758 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationsAuthoringModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/ConversationsAuthoringModelFactory.cs @@ -15,80 +15,44 @@ namespace Azure.AI.Language.Conversations.Authoring /// Model factory for models. public static partial class ConversationsAuthoringModelFactory { - /// 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) + /// 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 lastTrainedOn = default, DateTimeOffset lastDeployedOn = default, DateTimeOffset deploymentExpiredOn = default, string modelTrainingConfigVersion = null, IEnumerable assignedResources = null) { - details ??= new List(); + assignedResources ??= new List(); - return new AuthoringConversationsError( - code, - message, - target, - details?.ToList(), - innererror, + return new ProjectDeployment( + deploymentName, + modelId, + lastTrainedOn, + lastDeployedOn, + deploymentExpiredOn, + modelTrainingConfigVersion, + assignedResources?.ToList(), 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) + /// 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) { - details ??= new Dictionary(); - - return new InnerErrorModel( - code, - message, - details, - target, - innererror, - serializedAdditionalRawData: null); + return new DeploymentResource(resourceId, region, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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. @@ -96,10 +60,14 @@ public static InnerErrorModel InnerErrorModel(InnerErrorCode code = default, str /// 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) + /// A new instance for mocking. + public static ProjectMetadata ProjectMetadata(DateTimeOffset createdOn = default, DateTimeOffset lastModifiedOn = default, DateTimeOffset? lastTrainedOn = null, DateTimeOffset? lastDeployedOn = null, AnalyzeConversationAuthoringProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) { - return new CreateProjectDetails( + return new ProjectMetadata( + createdOn, + lastModifiedOn, + lastTrainedOn, + lastDeployedOn, projectKind, settings, storageInputContainerName, @@ -110,253 +78,100 @@ public static CreateProjectDetails CreateProjectDetails(ProjectKind projectKind 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 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 . - /// 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 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) + /// 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) { - entities ??= new List(); - - return new ConversationExportedUtterance( - entities?.ToList(), - text, - language, - intent, - dataset, - serializedAdditionalRawData: null); + return new SupportedLanguage(languageName, languageCode, 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) + /// 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) { - return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData: null); - } + deploymentsMetadata ??= new List(); - /// 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); + return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The LUIS application target details. - /// A new instance for mocking. - public static ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration = 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 lastDeployedOn = default, DateTimeOffset deploymentExpiresOn = default) { - return new ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind.Luis, serializedAdditionalRawData: null, luisOrchestration); + return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedOn, deploymentExpiresOn, serializedAdditionalRawData: null); } - /// 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) + /// Initializes a new instance of . + /// The resource ID. + /// The resource region. + /// A new instance for mocking. + public static AssignedDeploymentResource AssignedDeploymentResource(string resourceId = null, string region = null) { - return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData: null); + return new AssignedDeploymentResource(resourceId, region, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The Question Answering project details. - /// A new instance for mocking. - public static ExportedQuestionAnsweringOrchestrationDetails ExportedQuestionAnsweringOrchestrationDetails(ExportedQuestionAnsweringOrchestration questionAnsweringOrchestration = 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 ExportedQuestionAnsweringOrchestrationDetails(OrchestrationTargetProjectKind.QuestionAnswering, serializedAdditionalRawData: null, questionAnsweringOrchestration); + return new PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); } - /// 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) + /// 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 OrchestrationExportedUtterance(text, language, intent, dataset, serializedAdditionalRawData: null); + return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 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) + /// Represents training tasks detailed result. + /// A new instance for mocking. + public static TrainingOperationState TrainingOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, TrainingJobResult result = null) { - warnings ??= new List(); - errors ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new ImportProjectJobState( + return new TrainingOperationState( jobId, - createdDateTime, - lastUpdatedDateTime, - expirationDateTime, + createdOn, + lastUpdatedOn, + expiresOn, status, warnings?.ToList(), errors?.ToList(), + result, 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. + /// 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) + public static TrainingJobResult TrainingJobResult(string modelLabel = null, string trainingConfigVersion = null, AnalyzeConversationAuthoringTrainingMode? trainingMode = null, SubTrainingOperationState trainingStatus = null, SubTrainingOperationState evaluationStatus = null, DateTimeOffset? estimatedEndOn = null) { return new TrainingJobResult( modelLabel, @@ -364,220 +179,94 @@ public static TrainingJobResult TrainingJobResult(string modelLabel = null, stri trainingMode, trainingStatus, evaluationStatus, - estimatedEndDateTime, + estimatedEndOn, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Represents progress percentage. - /// Represents the start date time. - /// Represents the end date time. + /// 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) + /// A new instance for mocking. + public static SubTrainingOperationState SubTrainingOperationState(int percentComplete = default, DateTimeOffset? startedOn = null, DateTimeOffset? endedOn = null, ConversationAuthoringOperationStatus 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 . - /// 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 . - /// 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 . - /// 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 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 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); + return new SubTrainingOperationState(percentComplete, startedOn, endedOn, status, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// The trained model label. /// The model ID. - /// The last trained date time of the model. + /// 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 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) + public static ProjectTrainedModel ProjectTrainedModel(string label = null, string modelId = null, DateTimeOffset lastTrainedOn = default, int lastTrainingDurationInSeconds = default, DateTimeOffset modelExpiredOn = default, string modelTrainingConfigVersion = null, bool hasSnapshot = default) { return new ProjectTrainedModel( label, modelId, - lastTrainedDateTime, - lastTrainingDurationInSeconds, - modelExpirationDate, + lastTrainedOn, + lastTrainingDurationInSeconds, + modelExpiredOn, + modelTrainingConfigVersion, + hasSnapshot, + 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 lastTrainedOn = default, DateTimeOffset lastExportedModelOn = default, DateTimeOffset modelExpiredOn = default, string modelTrainingConfigVersion = null) + { + return new ExportedTrainedModel( + exportedModelName, + modelId, + lastTrainedOn, + lastExportedModelOn, + modelExpiredOn, modelTrainingConfigVersion, - hasSnapshot, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// Represents the options used running the evaluation. + /// 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) + public static EvaluationJobResult EvaluationJobResult(EvaluationDetails evaluationDetails = null, string modelLabel = null, string trainingConfigVersion = null, int percentComplete = default) { - return new EvaluationJobResult(evaluationOptions, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); + return new EvaluationJobResult(evaluationDetails, modelLabel, trainingConfigVersion, percentComplete, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 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) + /// A new instance for mocking. + public static EvaluationOperationState EvaluationOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, EvaluationJobResult result = null) { - warnings ??= new List(); - errors ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new EvaluationJobState( + return new EvaluationOperationState( jobId, - createdDateTime, - lastUpdatedDateTime, - expirationDateTime, + createdOn, + lastUpdatedOn, + expiresOn, status, warnings?.ToList(), errors?.ToList(), @@ -585,25 +274,25 @@ public static EvaluationJobState EvaluationJobState(string jobId = null, DateTim serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 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) + /// A new instance for mocking. + public static LoadSnapshotOperationState LoadSnapshotOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) { - warnings ??= new List(); - errors ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new LoadSnapshotJobState( + return new LoadSnapshotOperationState( jobId, - createdDateTime, - lastUpdatedDateTime, - expirationDateTime, + createdOn, + lastUpdatedOn, + expiresOn, status, warnings?.ToList(), errors?.ToList(), @@ -672,8 +361,9 @@ public static EvaluationSummary EvaluationSummary(EntitiesEvaluationSummary enti /// 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) + public static EntitiesEvaluationSummary EntitiesEvaluationSummary(IReadOnlyDictionary confusionMatrix = null, IReadOnlyDictionary entities = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) { + confusionMatrix ??= new Dictionary(); entities ??= new Dictionary(); return new EntitiesEvaluationSummary( @@ -688,39 +378,29 @@ public static EntitiesEvaluationSummary EntitiesEvaluationSummary(ConfusionMatri 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 . + /// Initializes a new instance of . /// Additional Properties. - /// A new instance for mocking. - public static ConfusionMatrixRow ConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) + /// A new instance for mocking. + public static AnalyzeConversationConfusionMatrixRow AnalyzeConversationConfusionMatrixRow(IReadOnlyDictionary additionalProperties = null) { additionalProperties ??= new Dictionary(); - return new ConfusionMatrixRow(additionalProperties); + return new AnalyzeConversationConfusionMatrixRow(additionalProperties); } - /// Initializes a new instance of . + /// 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) + /// A new instance for mocking. + public static AnalyzeConversationConfusionMatrixCell AnalyzeConversationConfusionMatrixCell(float normalizedValue = default, float rawValue = default) { - return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); + return new AnalyzeConversationConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// Represents the model precision. - /// Represents the model recall. - /// Represents the model F1 score. + /// Represents the model F1 score. + /// Represents the model precision. + /// Represents the model precision. /// Represents the count of true positive. /// Represents the count of true negative. /// Represents the count of false positive. @@ -749,8 +429,9 @@ public static EntityEvaluationSummary EntityEvaluationSummary(double f1 = defaul /// 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) + public static IntentsEvaluationSummary IntentsEvaluationSummary(IReadOnlyDictionary confusionMatrix = null, IReadOnlyDictionary intents = null, float microF1 = default, float microPrecision = default, float microRecall = default, float macroF1 = default, float macroPrecision = default, float macroRecall = default) { + confusionMatrix ??= new Dictionary(); intents ??= new Dictionary(); return new IntentsEvaluationSummary( @@ -787,172 +468,387 @@ public static IntentEvaluationSummary IntentEvaluationSummary(double f1 = defaul 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) + /// 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 ExportedModelOperationState ExportedModelOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new ExportedModelOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), + 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(AnalyzeConversationAuthoringProjectKind projectKind = default, ProjectSettings settings = null, string storageInputContainerName = null, string projectName = null, bool? multilingual = null, string description = null, string language = null) { - return new AssignedDeploymentResource(azureResourceId, region, serializedAdditionalRawData: null); + return new CreateProjectDetails( + projectKind, + settings, + storageInputContainerName, + projectName, + multilingual, + description, + language, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 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) + /// A new instance for mocking. + public static ProjectDeletionOperationState ProjectDeletionOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) { - warnings ??= new List(); - errors ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new DeploymentResourcesJobState( + return new ProjectDeletionOperationState( jobId, - createdDateTime, - lastUpdatedDateTime, - expirationDateTime, + createdOn, + lastUpdatedOn, + expiresOn, 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) + /// 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 ExportProjectOperationState ExportProjectOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null, string resultUri = null) { - value ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new AssignedResourceDeploymentsMetadata(value?.ToList(), nextLink, serializedAdditionalRawData: null); + return new ExportProjectOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), + resultUri, + 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) + /// 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, ExportedProjectAsset assets = null) { - deploymentsMetadata ??= new List(); + return new ExportedProject(projectFileVersion, stringIndexType, metadata, assets, serializedAdditionalRawData: null); + } - return new AssignedProjectDeploymentsMetadata(projectName, deploymentsMetadata?.ToList(), 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, AnalyzeConversationAuthoringCompositionMode? compositionMode = null, ExportedEntityList entities = null, IEnumerable prebuilts = null, ExportedEntityRegex regex = null, IEnumerable requiredComponents = null) + { + prebuilts ??= new List(); + requiredComponents ??= new List(); + + return new ConversationExportedEntity( + category, + compositionMode, + entities, + prebuilts?.ToList(), + regex, + requiredComponents?.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) + /// 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, DatasetType? dataset = null) { - return new AssignedProjectDeploymentMetadata(deploymentName, lastDeployedDateTime, deploymentExpirationDate, serializedAdditionalRawData: null); + entities ??= new List(); + + return new ConversationExportedUtterance( + entities?.ToList(), + text, + language, + intent, + dataset, + 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) + /// 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) { - value ??= new List(); + return new OrchestrationExportedIntent(orchestration, category, serializedAdditionalRawData: null); + } - return new SupportedLanguages(value?.ToList(), nextLink, 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 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) + /// Initializes a new instance of . + /// The LUIS application target details. + /// A new instance for mocking. + public static ExportedLuisOrchestrationDetails ExportedLuisOrchestrationDetails(ExportedLuisOrchestration luisOrchestration = null) { - return new SupportedLanguage(languageName, languageCode, serializedAdditionalRawData: null); + return new ExportedLuisOrchestrationDetails(OrchestrationTargetProjectKind.Luis, serializedAdditionalRawData: null, luisOrchestration); } - /// 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) + /// 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) { - value ??= new List(); + return new ExportedLuisOrchestration(appId, appVersion, slotName, serializedAdditionalRawData: null); + } - return new PrebuiltEntities(value?.ToList(), nextLink, 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 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) + /// 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 PrebuiltEntity(category, description, examples, serializedAdditionalRawData: null); + return new OrchestrationExportedUtterance(text, language, intent, dataset, 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) + /// 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 ImportProjectOperationState ImportProjectOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) { - value ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new TrainingConfigVersions(value?.ToList(), nextLink, serializedAdditionalRawData: null); + return new ImportProjectOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), + 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) + /// 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 CopyProjectOperationState CopyProjectOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) { - return new TrainingConfigVersion(trainingConfigVersionProperty, modelExpirationDate, serializedAdditionalRawData: null); + warnings ??= new List(); + errors ??= new List(); + + return new CopyProjectOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), + 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) + /// 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, AnalyzeConversationAuthoringTrainingMode trainingMode = default, EvaluationDetails evaluationOptions = null) { - return new ExportedTrainedModel( - exportedModelName, - modelId, - lastTrainedDateTime, - lastExportedModelDateTime, - modelExpirationDate, - modelTrainingConfigVersion, + return new TrainingJobDetails(modelLabel, trainingConfigVersion, trainingMode, evaluationOptions, 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 SwapDeploymentsOperationState SwapDeploymentsOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new SwapDeploymentsOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), + 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 DeploymentOperationState DeploymentOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + 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 DeploymentDeleteFromResourcesOperationState DeploymentDeleteFromResourcesOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) + { + warnings ??= new List(); + errors ??= new List(); + + return new DeploymentDeleteFromResourcesOperationState( + jobId, + createdOn, + lastUpdatedOn, + expiresOn, + status, + warnings?.ToList(), + errors?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 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) + /// A new instance for mocking. + public static DeploymentResourcesOperationState DeploymentResourcesOperationState(string jobId = null, DateTimeOffset createdOn = default, DateTimeOffset lastUpdatedOn = default, DateTimeOffset? expiresOn = null, ConversationAuthoringOperationStatus status = default, IEnumerable warnings = null, IEnumerable errors = null) { - warnings ??= new List(); - errors ??= new List(); + warnings ??= new List(); + errors ??= new List(); - return new ExportedModelJobState( + return new DeploymentResourcesOperationState( jobId, - createdDateTime, - lastUpdatedDateTime, - expirationDateTime, + createdOn, + lastUpdatedOn, + expiresOn, status, warnings?.ToList(), errors?.ToList(), 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 deleted file mode 100644 index ad7f0d4545c2..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AnalyzeConversationAuthoring.xml +++ /dev/null @@ -1,5911 +0,0 @@ - - - - - -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/Docs/AuthoringClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AuthoringClient.xml new file mode 100644 index 000000000000..c4bb4bc93099 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/AuthoringClient.xml @@ -0,0 +1,1215 @@ + + + + + +This sample shows how to call GetDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (ProjectDeployment item in client.GetDeployments("")) +{ +} +]]> +This sample shows how to call GetDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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 GetProjectsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectMetadata item in client.GetProjectsAsync()) +{ +} +]]> +This sample shows how to call GetProjectsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetProjects. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (ProjectMetadata item in client.GetProjects()) +{ +} +]]> +This sample shows how to call GetProjects with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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 GetSupportedLanguagesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(AnalyzeConversationAuthoringProjectKind.Conversation)) +{ +} +]]> +This sample shows how to call GetSupportedLanguagesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguages. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (SupportedLanguage item in client.GetSupportedLanguages(AnalyzeConversationAuthoringProjectKind.Conversation)) +{ +} +]]> +This sample shows how to call GetSupportedLanguages with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (SupportedLanguage item in client.GetSupportedLanguages(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetSupportedLanguagesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedLanguages("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + 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 GetAssignedResourceDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetAssignedResourceDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) +{ +} +]]> +This sample shows how to call GetAssignedResourceDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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 GetDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("")) +{ +} +]]> +This sample shows how to call GetDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (AssignedDeploymentResource item in client.GetDeploymentResources("")) +{ +} +]]> +This sample shows how to call GetDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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 GetSupportedPrebuiltEntitiesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntitiesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234, language: "", multilingual: "")) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntities. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) +{ +} +]]> +This sample shows how to call GetSupportedPrebuiltEntities with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities(maxCount: 1234, skip: 1234, maxpagesize: 1234, language: "", multilingual: "")) +{ +} +]]> + + + +This sample shows how to call GetSupportedPrebuiltEntitiesAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(1234, 1234, 1234, "", "", 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null, null, null, null, null, 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedPrebuiltEntities(1234, 1234, 1234, "", "", 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(AnalyzeConversationAuthoringProjectKind.Conversation)) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersionsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersions. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(AnalyzeConversationAuthoringProjectKind.Conversation)) +{ +} +]]> +This sample shows how to call GetTrainingConfigVersions with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingConfigVersionsAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) +{ + 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ + 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 GetTrainingJobsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (TrainingOperationState item in client.GetTrainingJobsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainingJobsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (TrainingOperationState item in client.GetTrainingJobsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainingJobs. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (TrainingOperationState item in client.GetTrainingJobs("")) +{ +} +]]> +This sample shows how to call GetTrainingJobs with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (TrainingOperationState 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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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 GetTrainedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetTrainedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetTrainedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (ProjectTrainedModel item in client.GetTrainedModels("")) +{ +} +]]> +This sample shows how to call GetTrainedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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 GetExportedModelsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("")) +{ +} +]]> +This sample shows how to call GetExportedModelsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) +{ +} +]]> + + + +This sample shows how to call GetExportedModels. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +foreach (ExportedTrainedModel item in client.GetExportedModels("")) +{ +} +]]> +This sample shows how to call GetExportedModels with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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(""); +AuthoringClient client = new AuthoringClient(endpoint, credential); + +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()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringDeployments.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringDeployments.xml new file mode 100644 index 000000000000..b63ffeb8c33c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringDeployments.xml @@ -0,0 +1,1389 @@ + + + + + +This sample shows how to call GetDeploymentAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentAsync("", ""); +]]> +This sample shows how to call GetDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentAsync("", ""); +]]> + + + +This sample shows how to call GetDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeployment("", ""); +]]> +This sample shows how to call GetDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeployment("", ""); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentDeleteFromResourcesStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentDeleteFromResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeploymentDeleteFromResourcesStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetDeploymentDeleteFromResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> +This sample shows how to call GetDeploymentStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetDeploymentStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> +This sample shows how to call GetDeploymentStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetDeploymentStatus("", "", ""); +]]> + + + +This sample shows how to call GetDeploymentStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetDeploymentStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetSwapDeploymentsStatusAsync("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> +This sample shows how to call GetSwapDeploymentsStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetSwapDeploymentsStatus("", ""); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetSwapDeploymentsStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetAssignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetAssignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetAssignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> +This sample shows how to call GetUnassignDeploymentResourcesStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Response response = client.GetUnassignDeploymentResourcesStatus("", ""); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetUnassignDeploymentResourcesStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", details); +]]> +This sample shows how to call SwapDeploymentsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); +Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call SwapDeployments. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", details); +]]> +This sample shows how to call SwapDeployments with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); +Operation operation = client.SwapDeployments(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call SwapDeploymentsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +CreateDeploymentDetails details = new CreateDeploymentDetails(""); +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call DeployProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +CreateDeploymentDetails details = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call DeployProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +CreateDeploymentDetails details = new CreateDeploymentDetails(""); +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call DeployProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +CreateDeploymentDetails details = new CreateDeploymentDetails("") +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeployProject(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call DeployProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeploymentAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeployment. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteDeployment with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +DeleteDeploymentDetails details = new DeleteDeploymentDetails(); +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call DeleteDeploymentFromResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +DeleteDeploymentDetails details = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call DeleteDeploymentFromResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +DeleteDeploymentDetails details = new DeleteDeploymentDetails(); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call DeleteDeploymentFromResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +DeleteDeploymentDetails details = new DeleteDeploymentDetails +{ + AssignedResourceIds = { "" }, +}; +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call DeleteDeploymentFromResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", content); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", details); +]]> +This sample shows how to call AssignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call AssignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", details); +]]> +This sample shows how to call AssignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] +{ + new ResourceMetadata("", "", "") +}); +Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call AssignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", details); +]]> +This sample shows how to call UnassignDeploymentResourcesAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call UnassignDeploymentResources. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", details); +]]> +This sample shows how to call UnassignDeploymentResources with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call UnassignDeploymentResourcesAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +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(""); +ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + +using RequestContent content = RequestContent.Create(new +{ + assignedResourceIds = new object[] + { + "" + }, +}); +Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", content); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringModels.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringModels.xml new file mode 100644 index 000000000000..bf63899ac002 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringModels.xml @@ -0,0 +1,1343 @@ + + + + + +This sample shows how to call GetTrainedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> +This sample shows how to call GetTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetTrainedModelAsync("", ""); +]]> + + + +This sample shows how to call GetTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetTrainedModel("", ""); +]]> +This sample shows how to call GetTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetTrainedModel("", ""); +]]> + + + +This sample shows how to call GetTrainedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.DeleteTrainedModelAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTrainedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTrainedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.DeleteTrainedModel("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> +This sample shows how to call GetEvaluationStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetEvaluationStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> +This sample shows how to call GetEvaluationStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetEvaluationStatus("", "", ""); +]]> + + + +This sample shows how to call GetEvaluationStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> +This sample shows how to call GetModelEvaluationSummaryAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetModelEvaluationSummaryAsync("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummary. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> +This sample shows how to call GetModelEvaluationSummary with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetModelEvaluationSummary("", ""); +]]> + + + +This sample shows how to call GetModelEvaluationSummaryAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetModelEvaluationSummary("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> +This sample shows how to call GetLoadSnapshotStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetLoadSnapshotStatus("", "", ""); +]]> + + + +This sample shows how to call GetLoadSnapshotStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetLoadSnapshotStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetExportedModelAsync("", ""); +]]> +This sample shows how to call GetExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetExportedModelAsync("", ""); +]]> + + + +This sample shows how to call GetExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetExportedModel("", ""); +]]> +This sample shows how to call GetExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetExportedModel("", ""); +]]> + + + +This sample shows how to call GetExportedModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = await client.GetExportedModelJobStatusAsync("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> +This sample shows how to call GetExportedModelJobStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Response response = client.GetExportedModelJobStatus("", "", ""); +]]> + + + +This sample shows how to call GetExportedModelJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetExportedModelJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetModelEvaluationResultsAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +await foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResultsAsync("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResultsAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +foreach (UtteranceEvaluationResult item in client.GetModelEvaluationResults("", "", StringIndexType.Utf16CodeUnit)) +{ +} +]]> +This sample shows how to call GetModelEvaluationResults with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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 EvaluateModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +EvaluationDetails details = new EvaluationDetails(); +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", details); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +EvaluationDetails details = new EvaluationDetails +{ + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", details); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +EvaluationDetails details = new EvaluationDetails(); +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", details); +EvaluationJobResult responseData = operation.Value; +]]> +This sample shows how to call EvaluateModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +EvaluationDetails details = new EvaluationDetails +{ + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, +}; +Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", details); +EvaluationJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call EvaluateModelAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshotAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call LoadSnapshot. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call LoadSnapshot with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call DeleteExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> +This sample shows how to call DeleteExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +ExportedModelDetails details = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call CreateOrUpdateExportedModelAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +ExportedModelDetails details = new ExportedModelDetails(""); +Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModel. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +ExportedModelDetails details = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", details); +]]> +This sample shows how to call CreateOrUpdateExportedModel with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +ExportedModelDetails details = new ExportedModelDetails(""); +Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", details); +]]> + + + +This sample shows how to call CreateOrUpdateExportedModelAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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(""); +ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + +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/Docs/ConversationAuthoringProjects.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringProjects.xml new file mode 100644 index 000000000000..f1cbfb27fe64 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Docs/ConversationAuthoringProjects.xml @@ -0,0 +1,2019 @@ + + + + + +This sample shows how to call GetProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetProjectAsync(""); +]]> +This sample shows how to call GetProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetProjectAsync(""); +]]> + + + +This sample shows how to call GetProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetProject(""); +]]> +This sample shows how to call GetProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetProject(""); +]]> + + + +This sample shows how to call GetProjectAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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 GetProjectDeletionStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> +This sample shows how to call GetProjectDeletionStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetProjectDeletionStatusAsync(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetProjectDeletionStatus(""); +]]> +This sample shows how to call GetProjectDeletionStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetProjectDeletionStatus(""); +]]> + + + +This sample shows how to call GetProjectDeletionStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetProjectDeletionStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetExportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetExportStatusAsync("", ""); +]]> +This sample shows how to call GetExportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetExportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetExportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetExportStatus("", ""); +]]> +This sample shows how to call GetExportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetExportStatus("", ""); +]]> + + + +This sample shows how to call GetExportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetExportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("resultUrl").ToString()); +]]> + + + +This sample shows how to call GetImportStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetImportStatusAsync("", ""); +]]> +This sample shows how to call GetImportStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetImportStatusAsync("", ""); +]]> + + + +This sample shows how to call GetImportStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetImportStatus("", ""); +]]> +This sample shows how to call GetImportStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetImportStatus("", ""); +]]> + + + +This sample shows how to call GetImportStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetImportStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call AuthorizeProjectCopyAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.AuthorizeProjectCopyAsync("", AnalyzeConversationAuthoringProjectKind.Conversation); +]]> +This sample shows how to call AuthorizeProjectCopyAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.AuthorizeProjectCopyAsync("", AnalyzeConversationAuthoringProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call AuthorizeProjectCopy. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.AuthorizeProjectCopy("", AnalyzeConversationAuthoringProjectKind.Conversation); +]]> +This sample shows how to call AuthorizeProjectCopy with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.AuthorizeProjectCopy("", AnalyzeConversationAuthoringProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); +]]> + + + +This sample shows how to call AuthorizeProjectCopyAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = await client.AuthorizeProjectCopyAsync("", 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 AuthorizeProjectCopyAsync with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = await client.AuthorizeProjectCopyAsync("", 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 AuthorizeProjectCopy and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", +}); +Response response = client.AuthorizeProjectCopy("", 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 AuthorizeProjectCopy with all parameters and request content and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +using RequestContent content = RequestContent.Create(new +{ + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, +}); +Response response = client.AuthorizeProjectCopy("", 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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> +This sample shows how to call GetCopyProjectStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetCopyProjectStatusAsync("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetCopyProjectStatus("", ""); +]]> +This sample shows how to call GetCopyProjectStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetCopyProjectStatus("", ""); +]]> + + + +This sample shows how to call GetCopyProjectStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetCopyProjectStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); +]]> + + + +This sample shows how to call GetTrainingStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> +This sample shows how to call GetTrainingStatusAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = await client.GetTrainingStatusAsync("", ""); +]]> + + + +This sample shows how to call GetTrainingStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetTrainingStatus("", ""); +]]> +This sample shows how to call GetTrainingStatus with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Response response = client.GetTrainingStatus("", ""); +]]> + + + +This sample shows how to call GetTrainingStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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("warnings")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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 DeleteProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call DeleteProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> +This sample shows how to call DeleteProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.DeleteProject(WaitUntil.Completed, ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ExportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call ExportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call Export. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); +]]> +This sample shows how to call Export with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "")); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", exportedProject); +]]> +This sample shows how to call ImportAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAsset + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionMode = AnalyzeConversationAuthoringCompositionMode.ReturnLongestOverlap, + Entities = 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 = DatasetType.Train, + }}, + }, +}; +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", exportedProject, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "")); +Operation operation = client.Import(WaitUntil.Completed, "", exportedProject); +]]> +This sample shows how to call Import with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "") +{ + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", +}) +{ + Assets = new ConversationExportedProjectAsset + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") + { + CompositionMode = AnalyzeConversationAuthoringCompositionMode.ReturnLongestOverlap, + Entities = 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 = DatasetType.Train, + }}, + }, +}; +Operation operation = client.Import(WaitUntil.Completed, "", exportedProject, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation); +]]> + + + +This sample shows how to call ImportAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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", + entities = 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 = "Train", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call Import. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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", + entities = 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 = "Train", + } + }, + projectKind = "Conversation", + }, +}); +Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +CopyProjectDetails details = new CopyProjectDetails( +AnalyzeConversationAuthoringProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", details); +]]> +This sample shows how to call CopyProjectAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +CopyProjectDetails details = new CopyProjectDetails( +AnalyzeConversationAuthoringProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call CopyProject. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +CopyProjectDetails details = new CopyProjectDetails( +AnalyzeConversationAuthoringProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", details); +]]> +This sample shows how to call CopyProject with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +CopyProjectDetails details = new CopyProjectDetails( +AnalyzeConversationAuthoringProjectKind.Conversation, +"", +"", +DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +"", +""); +Operation operation = client.CopyProject(WaitUntil.Completed, "", details); +]]> + + + +This sample shows how to call CopyProjectAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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 TrainAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced); +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", details); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call TrainAsync with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = await client.TrainAsync(WaitUntil.Completed, "", details); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call Train. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced); +Operation operation = client.Train(WaitUntil.Completed, "", details); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call Train with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced) +{ + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, +}; +Operation operation = client.Train(WaitUntil.Completed, "", details); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call TrainAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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 CancelTrainingJobAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> + + + +This sample shows how to call CancelTrainingJob. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); +TrainingJobResult responseData = operation.Value; +]]> +This sample shows how to call CancelTrainingJob with all parameters. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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(""); +ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + +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()); +]]> + + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringCompositionMode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringCompositionMode.cs new file mode 100644 index 000000000000..41438155cdcb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringCompositionMode.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 AnalyzeConversationAuthoringCompositionMode. + public readonly partial struct AnalyzeConversationAuthoringCompositionMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeConversationAuthoringCompositionMode(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 AnalyzeConversationAuthoringCompositionMode ReturnLongestOverlap { get; } = new AnalyzeConversationAuthoringCompositionMode(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 AnalyzeConversationAuthoringCompositionMode RequireExactOverlap { get; } = new AnalyzeConversationAuthoringCompositionMode(RequireExactOverlapValue); + /// Every component's match or prediction is returned as a separate instance of the entity. + public static AnalyzeConversationAuthoringCompositionMode SeparateComponents { get; } = new AnalyzeConversationAuthoringCompositionMode(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 AnalyzeConversationAuthoringCompositionMode CombineComponents { get; } = new AnalyzeConversationAuthoringCompositionMode(CombineComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeConversationAuthoringCompositionMode left, AnalyzeConversationAuthoringCompositionMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeConversationAuthoringCompositionMode left, AnalyzeConversationAuthoringCompositionMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeConversationAuthoringCompositionMode(string value) => new AnalyzeConversationAuthoringCompositionMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeConversationAuthoringCompositionMode other && Equals(other); + /// + public bool Equals(AnalyzeConversationAuthoringCompositionMode 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/AnalyzeConversationAuthoringEvaluationKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringEvaluationKind.cs new file mode 100644 index 000000000000..3d74c0a93415 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringEvaluationKind.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 AnalyzeConversationAuthoringEvaluationKind. + public readonly partial struct AnalyzeConversationAuthoringEvaluationKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeConversationAuthoringEvaluationKind(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 AnalyzeConversationAuthoringEvaluationKind Percentage { get; } = new AnalyzeConversationAuthoringEvaluationKind(PercentageValue); + /// Split the data according to the chosen dataset for every example in the data. + public static AnalyzeConversationAuthoringEvaluationKind Manual { get; } = new AnalyzeConversationAuthoringEvaluationKind(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeConversationAuthoringEvaluationKind left, AnalyzeConversationAuthoringEvaluationKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeConversationAuthoringEvaluationKind left, AnalyzeConversationAuthoringEvaluationKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeConversationAuthoringEvaluationKind(string value) => new AnalyzeConversationAuthoringEvaluationKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeConversationAuthoringEvaluationKind other && Equals(other); + /// + public bool Equals(AnalyzeConversationAuthoringEvaluationKind 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/AnalyzeConversationAuthoringExportedProjectFormat.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringExportedProjectFormat.cs new file mode 100644 index 000000000000..43d83bce80c7 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringExportedProjectFormat.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 AnalyzeConversationAuthoringExportedProjectFormat. + public readonly partial struct AnalyzeConversationAuthoringExportedProjectFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeConversationAuthoringExportedProjectFormat(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 AnalyzeConversationAuthoringExportedProjectFormat Conversation { get; } = new AnalyzeConversationAuthoringExportedProjectFormat(ConversationValue); + /// Specifies the format for an application that was exported from LUIS. + public static AnalyzeConversationAuthoringExportedProjectFormat Luis { get; } = new AnalyzeConversationAuthoringExportedProjectFormat(LuisValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeConversationAuthoringExportedProjectFormat left, AnalyzeConversationAuthoringExportedProjectFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeConversationAuthoringExportedProjectFormat left, AnalyzeConversationAuthoringExportedProjectFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeConversationAuthoringExportedProjectFormat(string value) => new AnalyzeConversationAuthoringExportedProjectFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeConversationAuthoringExportedProjectFormat other && Equals(other); + /// + public bool Equals(AnalyzeConversationAuthoringExportedProjectFormat 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/AnalyzeConversationAuthoringProjectKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringProjectKind.cs new file mode 100644 index 000000000000..d63a1e50307b --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringProjectKind.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 AnalyzeConversationAuthoringProjectKind. + public readonly partial struct AnalyzeConversationAuthoringProjectKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeConversationAuthoringProjectKind(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 AnalyzeConversationAuthoringProjectKind Conversation { get; } = new AnalyzeConversationAuthoringProjectKind(ConversationValue); + /// A project to connect and orchestrate Conversation, Custom question answering and LUIS projects together in one single project. + public static AnalyzeConversationAuthoringProjectKind Orchestration { get; } = new AnalyzeConversationAuthoringProjectKind(OrchestrationValue); + /// A project to build conversation summarization models which are able to summarize long conversations. + public static AnalyzeConversationAuthoringProjectKind CustomConversationSummarization { get; } = new AnalyzeConversationAuthoringProjectKind(CustomConversationSummarizationValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeConversationAuthoringProjectKind left, AnalyzeConversationAuthoringProjectKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeConversationAuthoringProjectKind left, AnalyzeConversationAuthoringProjectKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeConversationAuthoringProjectKind(string value) => new AnalyzeConversationAuthoringProjectKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeConversationAuthoringProjectKind other && Equals(other); + /// + public bool Equals(AnalyzeConversationAuthoringProjectKind 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/AnalyzeConversationAuthoringTrainingMode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringTrainingMode.cs new file mode 100644 index 000000000000..2ecdb3bcd4f6 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationAuthoringTrainingMode.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 AnalyzeConversationAuthoringTrainingMode. + public readonly partial struct AnalyzeConversationAuthoringTrainingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AnalyzeConversationAuthoringTrainingMode(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 AnalyzeConversationAuthoringTrainingMode Advanced { get; } = new AnalyzeConversationAuthoringTrainingMode(AdvancedValue); + /// Faster training times for quicker iterations. + public static AnalyzeConversationAuthoringTrainingMode Standard { get; } = new AnalyzeConversationAuthoringTrainingMode(StandardValue); + /// Determines if two values are the same. + public static bool operator ==(AnalyzeConversationAuthoringTrainingMode left, AnalyzeConversationAuthoringTrainingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AnalyzeConversationAuthoringTrainingMode left, AnalyzeConversationAuthoringTrainingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AnalyzeConversationAuthoringTrainingMode(string value) => new AnalyzeConversationAuthoringTrainingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AnalyzeConversationAuthoringTrainingMode other && Equals(other); + /// + public bool Equals(AnalyzeConversationAuthoringTrainingMode 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/ConfusionMatrixCell.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixCell.Serialization.cs similarity index 63% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixCell.Serialization.cs index cc2df8970195..e91a2c4053b0 100644 --- 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/AnalyzeConversationConfusionMatrixCell.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel + public partial class AnalyzeConversationConfusionMatrixCell : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// 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; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixCell)} does not support writing '{format}' format."); } writer.WritePropertyName("normalizedValue"u8); @@ -55,19 +55,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeConversationConfusionMatrixCell IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixCell)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConfusionMatrixCell(document.RootElement, options); + return DeserializeAnalyzeConversationConfusionMatrixCell(document.RootElement, options); } - internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) + internal static AnalyzeConversationConfusionMatrixCell DeserializeAnalyzeConversationConfusionMatrixCell(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -97,46 +97,46 @@ internal static ConfusionMatrixCell DeserializeConfusionMatrixCell(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new ConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); + return new AnalyzeConversationConfusionMatrixCell(normalizedValue, rawValue, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixCell)} does not support writing '{options.Format}' format."); } } - ConfusionMatrixCell IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeConversationConfusionMatrixCell IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeAnalyzeConversationConfusionMatrixCell(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConfusionMatrixCell)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixCell)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static AnalyzeConversationConfusionMatrixCell FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeConfusionMatrixCell(document.RootElement); + return DeserializeAnalyzeConversationConfusionMatrixCell(document.RootElement); } /// Convert into a . 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/AnalyzeConversationConfusionMatrixCell.cs similarity index 78% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixCell.cs index f1d43695af13..8257cdcb13b6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixCell.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixCell.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents a cell in a confusion matrix. - public partial class ConfusionMatrixCell + public partial class AnalyzeConversationConfusionMatrixCell { /// /// Keeps track of any properties unknown to the library. @@ -45,28 +45,28 @@ public partial class ConfusionMatrixCell /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Represents normalized value in percentages. /// Represents raw value. - internal ConfusionMatrixCell(float normalizedValue, float rawValue) + internal AnalyzeConversationConfusionMatrixCell(float normalizedValue, float rawValue) { NormalizedValue = normalizedValue; RawValue = rawValue; } - /// Initializes a new instance of . + /// 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) + internal AnalyzeConversationConfusionMatrixCell(float normalizedValue, float rawValue, IDictionary serializedAdditionalRawData) { NormalizedValue = normalizedValue; RawValue = rawValue; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ConfusionMatrixCell() + /// Initializes a new instance of for deserialization. + internal AnalyzeConversationConfusionMatrixCell() { } 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/AnalyzeConversationConfusionMatrixRow.Serialization.cs similarity index 59% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixRow.Serialization.cs index 05e9346b88b7..bc7aa56db46c 100644 --- 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/AnalyzeConversationConfusionMatrixRow.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel + public partial class AnalyzeConversationConfusionMatrixRow : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// 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; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixRow)} does not support writing '{format}' format."); } foreach (var item in AdditionalProperties) @@ -48,19 +48,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AnalyzeConversationConfusionMatrixRow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixRow)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConfusionMatrixRow(document.RootElement, options); + return DeserializeAnalyzeConversationConfusionMatrixRow(document.RootElement, options); } - internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) + internal static AnalyzeConversationConfusionMatrixRow DeserializeAnalyzeConversationConfusionMatrixRow(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -75,46 +75,46 @@ internal static ConfusionMatrixRow DeserializeConfusionMatrixRow(JsonElement ele additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new ConfusionMatrixRow(additionalProperties); + return new AnalyzeConversationConfusionMatrixRow(additionalProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixRow)} does not support writing '{options.Format}' format."); } } - ConfusionMatrixRow IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AnalyzeConversationConfusionMatrixRow IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeAnalyzeConversationConfusionMatrixRow(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConfusionMatrixRow)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AnalyzeConversationConfusionMatrixRow)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static AnalyzeConversationConfusionMatrixRow FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeConfusionMatrixRow(document.RootElement); + return DeserializeAnalyzeConversationConfusionMatrixRow(document.RootElement); } /// Convert into a . 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/AnalyzeConversationConfusionMatrixRow.cs similarity index 76% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixRow.cs index f83b84299f2e..1d70c6f70ef1 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrixRow.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AnalyzeConversationConfusionMatrixRow.cs @@ -10,18 +10,18 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - /// The ConfusionMatrixRow. - public partial class ConfusionMatrixRow + /// The AnalyzeConversationConfusionMatrixRow. + public partial class AnalyzeConversationConfusionMatrixRow { - /// Initializes a new instance of . - internal ConfusionMatrixRow() + /// Initializes a new instance of . + internal AnalyzeConversationConfusionMatrixRow() { AdditionalProperties = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Additional Properties. - internal ConfusionMatrixRow(IReadOnlyDictionary additionalProperties) + internal AnalyzeConversationConfusionMatrixRow(IReadOnlyDictionary additionalProperties) { AdditionalProperties = additionalProperties; } @@ -39,7 +39,7 @@ internal ConfusionMatrixRow(IReadOnlyDictionary additionalPr /// Supported types: /// /// - /// + /// /// /// /// 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 index 60bee30edf13..2edaf7a5ccfc 100644 --- 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 @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("resourcesMetadata"u8); writer.WriteStartArray(); - foreach (var item in ResourcesMetadata) + foreach (var item in Metadata) { writer.WriteObjectValue(item, options); } 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 index afaf75245625..db6ba4d810c3 100644 --- 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 @@ -47,21 +47,21 @@ public partial class AssignDeploymentResourcesDetails private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Represents the metadata for the resources to be assigned. - /// is null. - public AssignDeploymentResourcesDetails(IEnumerable resourcesMetadata) + /// Represents the metadata for the resources to be assigned. + /// is null. + public AssignDeploymentResourcesDetails(IEnumerable metadata) { - Argument.AssertNotNull(resourcesMetadata, nameof(resourcesMetadata)); + Argument.AssertNotNull(metadata, nameof(metadata)); - ResourcesMetadata = resourcesMetadata.ToList(); + Metadata = metadata.ToList(); } /// Initializes a new instance of . - /// Represents the metadata for the resources to be assigned. + /// Represents the metadata for the resources to be assigned. /// Keeps track of any properties unknown to the library. - internal AssignDeploymentResourcesDetails(IList resourcesMetadata, IDictionary serializedAdditionalRawData) + internal AssignDeploymentResourcesDetails(IList metadata, IDictionary serializedAdditionalRawData) { - ResourcesMetadata = resourcesMetadata; + Metadata = metadata; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -71,6 +71,6 @@ internal AssignDeploymentResourcesDetails() } /// Represents the metadata for the resources to be assigned. - public IList ResourcesMetadata { get; } + public IList Metadata { 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 index 9f5ca609d99b..aecef86d2486 100644 --- 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 @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W") { writer.WritePropertyName("azureResourceId"u8); - writer.WriteStringValue(AzureResourceId); + writer.WriteStringValue(ResourceId); } writer.WritePropertyName("region"u8); writer.WriteStringValue(Region); 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 index 618f6d01d66e..937823d307e8 100644 --- 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 @@ -56,12 +56,12 @@ internal AssignedDeploymentResource(string region) } /// Initializes a new instance of . - /// The resource ID. + /// The resource ID. /// The resource region. /// Keeps track of any properties unknown to the library. - internal AssignedDeploymentResource(string azureResourceId, string region, IDictionary serializedAdditionalRawData) + internal AssignedDeploymentResource(string resourceId, string region, IDictionary serializedAdditionalRawData) { - AzureResourceId = azureResourceId; + ResourceId = resourceId; Region = region; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,7 +72,7 @@ internal AssignedDeploymentResource() } /// The resource ID. - public string AzureResourceId { get; } + public string ResourceId { 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 index 04c1e3d2fe12..dcc6f5c8eed9 100644 --- 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 @@ -37,9 +37,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("deploymentName"u8); writer.WriteStringValue(DeploymentName); writer.WritePropertyName("lastDeployedDateTime"u8); - writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WriteStringValue(LastDeployedOn, "O"); writer.WritePropertyName("deploymentExpirationDate"u8); - writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WriteStringValue(DeploymentExpiresOn, "D"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) 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 index fae2ecce4b15..494860290526 100644 --- 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 @@ -47,28 +47,28 @@ public partial class AssignedProjectDeploymentMetadata /// Initializes a new instance of . /// Represents the deployment name. - /// Represents deployment last deployed time. - /// Represents deployment expiration date in the runtime. + /// Represents deployment last deployed time. + /// Represents deployment expiration date in the runtime. /// is null. - internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedDateTime, DateTimeOffset deploymentExpirationDate) + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedOn, DateTimeOffset deploymentExpiresOn) { Argument.AssertNotNull(deploymentName, nameof(deploymentName)); DeploymentName = deploymentName; - LastDeployedDateTime = lastDeployedDateTime; - DeploymentExpirationDate = deploymentExpirationDate; + LastDeployedOn = lastDeployedOn; + DeploymentExpiresOn = deploymentExpiresOn; } /// Initializes a new instance of . /// Represents the deployment name. - /// Represents deployment last deployed time. - /// Represents deployment expiration date in the runtime. + /// 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) + internal AssignedProjectDeploymentMetadata(string deploymentName, DateTimeOffset lastDeployedOn, DateTimeOffset deploymentExpiresOn, IDictionary serializedAdditionalRawData) { DeploymentName = deploymentName; - LastDeployedDateTime = lastDeployedDateTime; - DeploymentExpirationDate = deploymentExpirationDate; + LastDeployedOn = lastDeployedOn; + DeploymentExpiresOn = deploymentExpiresOn; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,8 +80,8 @@ internal AssignedProjectDeploymentMetadata() /// Represents the deployment name. public string DeploymentName { get; } /// Represents deployment last deployed time. - public DateTimeOffset LastDeployedDateTime { get; } + public DateTimeOffset LastDeployedOn { get; } /// Represents deployment expiration date in the runtime. - public DateTimeOffset DeploymentExpirationDate { get; } + public DateTimeOffset DeploymentExpiresOn { 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 index 5b597fcb1be1..7559bd8c4d52 100644 --- 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 @@ -34,8 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AssignedProjectDeploymentsMetadata)} does not support writing '{format}' format."); } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); + if (options.Format != "W") + { + writer.WritePropertyName("projectName"u8); + writer.WriteStringValue(ProjectName); + } writer.WritePropertyName("deploymentsMetadata"u8); writer.WriteStartArray(); foreach (var item in DeploymentsMetadata) 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 index 9f66a10adc3a..8c1facc21855 100644 --- 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 @@ -47,15 +47,12 @@ public partial class AssignedProjectDeploymentsMetadata 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) + /// is null. + internal AssignedProjectDeploymentsMetadata(IEnumerable deploymentsMetadata) { - Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(deploymentsMetadata, nameof(deploymentsMetadata)); - ProjectName = projectName; DeploymentsMetadata = deploymentsMetadata.ToList(); } 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 deleted file mode 100644 index abfd17b13326..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// 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 deleted file mode 100644 index 30cb10584f98..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AssignedResourceDeploymentsMetadata.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using 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 deleted file mode 100644 index e10a01cd735b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// 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 deleted file mode 100644 index ce1afc865676..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsError.cs +++ /dev/null @@ -1,100 +0,0 @@ -// 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 deleted file mode 100644 index 48ce205e2308..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.Serialization.cs +++ /dev/null @@ -1,150 +0,0 @@ -// 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 deleted file mode 100644 index d95d8f4f8f5c..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/AuthoringConversationsWarning.cs +++ /dev/null @@ -1,82 +0,0 @@ -// 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 deleted file mode 100644 index b4be981ec617..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CompositionSetting.cs +++ /dev/null @@ -1,57 +0,0 @@ -// 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 deleted file mode 100644 index 289628a1b94e..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.Serialization.cs +++ /dev/null @@ -1,128 +0,0 @@ -// 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 deleted file mode 100644 index 0334a2da03b5..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConfusionMatrix.cs +++ /dev/null @@ -1,69 +0,0 @@ -// 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/ConversationAuthoringOperationStatus.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationAuthoringOperationStatus.cs new file mode 100644 index 000000000000..7112361cfc79 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationAuthoringOperationStatus.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 ConversationAuthoringOperationStatus. + public readonly partial struct ConversationAuthoringOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConversationAuthoringOperationStatus(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 ConversationAuthoringOperationStatus NotStarted { get; } = new ConversationAuthoringOperationStatus(NotStartedValue); + /// running. + public static ConversationAuthoringOperationStatus Running { get; } = new ConversationAuthoringOperationStatus(RunningValue); + /// succeeded. + public static ConversationAuthoringOperationStatus Succeeded { get; } = new ConversationAuthoringOperationStatus(SucceededValue); + /// failed. + public static ConversationAuthoringOperationStatus Failed { get; } = new ConversationAuthoringOperationStatus(FailedValue); + /// cancelled. + public static ConversationAuthoringOperationStatus Cancelled { get; } = new ConversationAuthoringOperationStatus(CancelledValue); + /// cancelling. + public static ConversationAuthoringOperationStatus Cancelling { get; } = new ConversationAuthoringOperationStatus(CancellingValue); + /// partiallyCompleted. + public static ConversationAuthoringOperationStatus PartiallyCompleted { get; } = new ConversationAuthoringOperationStatus(PartiallyCompletedValue); + /// Determines if two values are the same. + public static bool operator ==(ConversationAuthoringOperationStatus left, ConversationAuthoringOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConversationAuthoringOperationStatus left, ConversationAuthoringOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConversationAuthoringOperationStatus(string value) => new ConversationAuthoringOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConversationAuthoringOperationStatus other && Equals(other); + /// + public bool Equals(ConversationAuthoringOperationStatus 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/ConversationExportedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedEntity.Serialization.cs index ffc9ece17b27..a905d7bbf3b9 100644 --- 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 @@ -36,15 +36,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("category"u8); writer.WriteStringValue(Category); - if (Optional.IsDefined(CompositionSetting)) + if (Optional.IsDefined(CompositionMode)) { writer.WritePropertyName("compositionSetting"u8); - writer.WriteStringValue(CompositionSetting.Value.ToString()); + writer.WriteStringValue(CompositionMode.Value.ToString()); } - if (Optional.IsDefined(List)) + if (Optional.IsDefined(Entities)) { - writer.WritePropertyName("list"u8); - writer.WriteObjectValue(List, options); + writer.WritePropertyName("entities"u8); + writer.WriteObjectValue(Entities, options); } if (Optional.IsCollectionDefined(Prebuilts)) { @@ -109,8 +109,8 @@ internal static ConversationExportedEntity DeserializeConversationExportedEntity return null; } string category = default; - CompositionSetting? compositionSetting = default; - ExportedEntityList list = default; + AnalyzeConversationAuthoringCompositionMode? compositionSetting = default; + ExportedEntityList entities = default; IList prebuilts = default; ExportedEntityRegex regex = default; IList requiredComponents = default; @@ -129,16 +129,16 @@ internal static ConversationExportedEntity DeserializeConversationExportedEntity { continue; } - compositionSetting = new CompositionSetting(property.Value.GetString()); + compositionSetting = new AnalyzeConversationAuthoringCompositionMode(property.Value.GetString()); continue; } - if (property.NameEquals("list"u8)) + if (property.NameEquals("entities"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - list = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); + entities = ExportedEntityList.DeserializeExportedEntityList(property.Value, options); continue; } if (property.NameEquals("prebuilts"u8)) @@ -187,7 +187,7 @@ internal static ConversationExportedEntity DeserializeConversationExportedEntity return new ConversationExportedEntity( category, compositionSetting, - list, + entities, prebuilts ?? new ChangeTrackingList(), regex, requiredComponents ?? new ChangeTrackingList(), 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 index 1c617fcdfbb1..d62bf4d550b9 100644 --- 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 @@ -59,17 +59,17 @@ public ConversationExportedEntity(string category) /// 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 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) + internal ConversationExportedEntity(string category, AnalyzeConversationAuthoringCompositionMode? compositionMode, ExportedEntityList entities, IList prebuilts, ExportedEntityRegex regex, IList requiredComponents, IDictionary serializedAdditionalRawData) { Category = category; - CompositionSetting = compositionSetting; - List = list; + CompositionMode = compositionMode; + Entities = entities; Prebuilts = prebuilts; Regex = regex; RequiredComponents = requiredComponents; @@ -84,9 +84,9 @@ 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; } + public AnalyzeConversationAuthoringCompositionMode? CompositionMode { get; set; } /// The list component of the entity. - public ExportedEntityList List { get; set; } + public ExportedEntityList Entities { get; set; } /// The prebuilt entities components. public IList Prebuilts { get; } /// The regex component of the entity. 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/ConversationExportedProjectAsset.Serialization.cs similarity index 73% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAsset.Serialization.cs index ac8e5daf98a1..247b0c64416d 100644 --- 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/ConversationExportedProjectAsset.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ConversationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + public partial class ConversationExportedProjectAsset : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter 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; + 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."); + throw new FormatException($"The model {nameof(ConversationExportedProjectAsset)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -67,19 +67,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - ConversationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ConversationExportedProjectAsset IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ConversationExportedProjectAsset)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConversationExportedProjectAssets(document.RootElement, options); + return DeserializeConversationExportedProjectAsset(document.RootElement, options); } - internal static ConversationExportedProjectAssets DeserializeConversationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + internal static ConversationExportedProjectAsset DeserializeConversationExportedProjectAsset(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -90,7 +90,7 @@ internal static ConversationExportedProjectAssets DeserializeConversationExporte IList intents = default; IList entities = default; IList utterances = default; - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -139,7 +139,7 @@ internal static ConversationExportedProjectAssets DeserializeConversationExporte } if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -148,46 +148,46 @@ internal static ConversationExportedProjectAssets DeserializeConversationExporte } } serializedAdditionalRawData = rawDataDictionary; - return new ConversationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), entities ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + return new ConversationExportedProjectAsset(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), entities ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ConversationExportedProjectAsset)} does not support writing '{options.Format}' format."); } } - ConversationExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ConversationExportedProjectAsset IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeConversationExportedProjectAsset(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ConversationExportedProjectAssets)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ConversationExportedProjectAsset)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static new ConversationExportedProjectAsset FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeConversationExportedProjectAssets(document.RootElement); + return DeserializeConversationExportedProjectAsset(document.RootElement); } /// Convert into a . 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/ConversationExportedProjectAsset.cs similarity index 72% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAsset.cs index 2691cb10e99d..f7076eb1699c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAssets.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ConversationExportedProjectAsset.cs @@ -11,24 +11,24 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the exported assets of a conversational project. - public partial class ConversationExportedProjectAssets : ExportedProjectAssets + public partial class ConversationExportedProjectAsset : ExportedProjectAsset { - /// Initializes a new instance of . - public ConversationExportedProjectAssets() + /// Initializes a new instance of . + public ConversationExportedProjectAsset() { - ProjectKind = ProjectKind.Conversation; + ProjectKind = AnalyzeConversationAuthoringProjectKind.Conversation; Intents = new ChangeTrackingList(); Entities = new ChangeTrackingList(); Utterances = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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) + internal ConversationExportedProjectAsset(AnalyzeConversationAuthoringProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList entities, IList utterances) : base(projectKind, serializedAdditionalRawData) { Intents = intents; Entities = entities; 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 index 68b49a371f93..cfdb01a4437c 100644 --- 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 @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Dataset)) { writer.WritePropertyName("dataset"u8); - writer.WriteStringValue(Dataset); + writer.WriteStringValue(Dataset.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -99,7 +99,7 @@ internal static ConversationExportedUtterance DeserializeConversationExportedUtt string text = default; string language = default; string intent = default; - string dataset = default; + DatasetType? dataset = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -135,7 +135,11 @@ internal static ConversationExportedUtterance DeserializeConversationExportedUtt } if (property.NameEquals("dataset"u8)) { - dataset = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataset = new DatasetType(property.Value.GetString()); continue; } if (options.Format != "W") 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 index 7816b840ba05..b3a34767c90e 100644 --- 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 @@ -66,7 +66,7 @@ public ConversationExportedUtterance(string text, string intent) /// 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) + internal ConversationExportedUtterance(IList entities, string text, string language, string intent, DatasetType? dataset, IDictionary serializedAdditionalRawData) { Entities = entities; Text = text; @@ -90,6 +90,6 @@ internal ConversationExportedUtterance() /// 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; } + public DatasetType? 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 index 3267d337db0d..4adbe127a0ae 100644 --- 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 @@ -83,7 +83,7 @@ internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizat { return null; } - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; string storageInputContainerName = default; bool? allowOverwrite = default; IDictionary serializedAdditionalRawData = default; @@ -92,7 +92,7 @@ internal static CopyProjectAuthorizationRequest DeserializeCopyProjectAuthorizat { if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (property.NameEquals("storageInputContainerName"u8)) 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 index e09ac95e521e..ab90cb77afbe 100644 --- 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 @@ -47,7 +47,7 @@ internal partial class CopyProjectAuthorizationRequest /// Initializes a new instance of . /// Represents the project kind. - internal CopyProjectAuthorizationRequest(ProjectKind projectKind) + internal CopyProjectAuthorizationRequest(AnalyzeConversationAuthoringProjectKind projectKind) { ProjectKind = projectKind; } @@ -57,7 +57,7 @@ internal CopyProjectAuthorizationRequest(ProjectKind projectKind) /// 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) + internal CopyProjectAuthorizationRequest(AnalyzeConversationAuthoringProjectKind projectKind, string storageInputContainerName, bool? allowOverwrite, IDictionary serializedAdditionalRawData) { ProjectKind = projectKind; StorageInputContainerName = storageInputContainerName; @@ -71,7 +71,7 @@ internal CopyProjectAuthorizationRequest() } /// Represents the project kind. - public ProjectKind ProjectKind { get; } + public AnalyzeConversationAuthoringProjectKind 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. 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 index 079609f4bae5..42a4ff30859b 100644 --- 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 @@ -83,7 +83,7 @@ internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement ele { return null; } - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; string targetProjectName = default; string accessToken = default; DateTimeOffset expiresAt = default; @@ -95,7 +95,7 @@ internal static CopyProjectDetails DeserializeCopyProjectDetails(JsonElement ele { if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (property.NameEquals("targetProjectName"u8)) 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 index 8d0bc4bd02b4..862fbd79a3c8 100644 --- 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 @@ -53,7 +53,7 @@ public partial class CopyProjectDetails /// 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) + public CopyProjectDetails(AnalyzeConversationAuthoringProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion) { Argument.AssertNotNull(targetProjectName, nameof(targetProjectName)); Argument.AssertNotNull(accessToken, nameof(accessToken)); @@ -76,7 +76,7 @@ public CopyProjectDetails(ProjectKind projectKind, string targetProjectName, str /// 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) + internal CopyProjectDetails(AnalyzeConversationAuthoringProjectKind projectKind, string targetProjectName, string accessToken, DateTimeOffset expiresAt, string targetResourceId, string targetResourceRegion, IDictionary serializedAdditionalRawData) { ProjectKind = projectKind; TargetProjectName = targetProjectName; @@ -93,7 +93,7 @@ internal CopyProjectDetails() } /// Represents the project kind. - public ProjectKind ProjectKind { get; set; } + public AnalyzeConversationAuthoringProjectKind ProjectKind { get; set; } /// The project name to be copied-into. public string TargetProjectName { get; set; } /// The access token. 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/CopyProjectOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectOperationState.Serialization.cs index 351975e9b155..7981485e3728 100644 --- 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/CopyProjectOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class CopyProjectJobState : IUtf8JsonSerializable, IJsonModel + public partial class CopyProjectOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// 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; + 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."); + throw new FormatException($"The model {nameof(CopyProjectOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CopyProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CopyProjectOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(CopyProjectOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCopyProjectJobState(document.RootElement, options); + return DeserializeCopyProjectOperationState(document.RootElement, options); } - internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static CopyProjectOperationState DeserializeCopyProjectOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement e DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement e } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement e { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement e { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static CopyProjectJobState DeserializeCopyProjectJobState(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new CopyProjectJobState( + return new CopyProjectOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(CopyProjectOperationState)} does not support writing '{options.Format}' format."); } } - CopyProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CopyProjectOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeCopyProjectOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CopyProjectJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CopyProjectOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static CopyProjectOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCopyProjectJobState(document.RootElement); + return DeserializeCopyProjectOperationState(document.RootElement); } /// Convert into a . 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/CopyProjectOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectOperationState.cs index affeb356c89a..c716ffda730e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/CopyProjectOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a copy job. - public partial class CopyProjectJobState + public partial class CopyProjectOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class CopyProjectJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal CopyProjectOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal CopyProjectOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CopyProjectJobState() + /// Initializes a new instance of for deserialization. + internal CopyProjectOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { 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 index 5d8062fd3505..cd2aa9443a78 100644 --- 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 @@ -97,7 +97,7 @@ internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement { return null; } - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; ProjectSettings settings = default; string storageInputContainerName = default; string projectName = default; @@ -110,7 +110,7 @@ internal static CreateProjectDetails DeserializeCreateProjectDetails(JsonElement { if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (property.NameEquals("settings"u8)) 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 index 3d21a556966e..eb19557d56e1 100644 --- 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 @@ -50,7 +50,7 @@ public partial class CreateProjectDetails /// 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) + public CreateProjectDetails(AnalyzeConversationAuthoringProjectKind projectKind, string projectName, string language) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(language, nameof(language)); @@ -69,7 +69,7 @@ public CreateProjectDetails(ProjectKind projectKind, string projectName, string /// 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) + internal CreateProjectDetails(AnalyzeConversationAuthoringProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) { ProjectKind = projectKind; Settings = settings; @@ -87,7 +87,7 @@ internal CreateProjectDetails() } /// Represents the project kind. - public ProjectKind ProjectKind { get; } + public AnalyzeConversationAuthoringProjectKind ProjectKind { get; } /// The project settings. public ProjectSettings Settings { get; set; } /// The storage container name in case of conversation summarization. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DatasetType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DatasetType.cs new file mode 100644 index 000000000000..a0e69c76f519 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DatasetType.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 dataset for this utterance. Allowed values are 'Train' and 'Test'. + public readonly partial struct DatasetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatasetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrainValue = "Train"; + private const string TestValue = "Test"; + + /// Split the data into training and test sets according to user-defined percentages. + public static DatasetType Train { get; } = new DatasetType(TrainValue); + /// Split the data according to the chosen dataset for every example in the data. + public static DatasetType Test { get; } = new DatasetType(TestValue); + /// Determines if two values are the same. + public static bool operator ==(DatasetType left, DatasetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatasetType left, DatasetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatasetType(string value) => new DatasetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatasetType other && Equals(other); + /// + public bool Equals(DatasetType 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/DeploymentDeleteFromResourcesJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesOperationState.Serialization.cs similarity index 68% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesOperationState.Serialization.cs index f2db094604c4..87b099b02a9f 100644 --- 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/DeploymentDeleteFromResourcesOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class DeploymentDeleteFromResourcesJobState : IUtf8JsonSerializable, IJsonModel + public partial class DeploymentDeleteFromResourcesOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writ /// 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; + 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."); + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DeploymentDeleteFromResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DeploymentDeleteFromResourcesOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement, options); + return DeserializeDeploymentDeleteFromResourcesOperationState(document.RootElement, options); } - internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDeleteFromResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static DeploymentDeleteFromResourcesOperationState DeserializeDeploymentDeleteFromResourcesOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDelet DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDelet } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDelet { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDelet { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static DeploymentDeleteFromResourcesJobState DeserializeDeploymentDelet } } serializedAdditionalRawData = rawDataDictionary; - return new DeploymentDeleteFromResourcesJobState( + return new DeploymentDeleteFromResourcesOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesOperationState)} does not support writing '{options.Format}' format."); } } - DeploymentDeleteFromResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DeploymentDeleteFromResourcesOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeDeploymentDeleteFromResourcesOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DeploymentDeleteFromResourcesOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static DeploymentDeleteFromResourcesOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDeploymentDeleteFromResourcesJobState(document.RootElement); + return DeserializeDeploymentDeleteFromResourcesOperationState(document.RootElement); } /// Convert into a . 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/DeploymentDeleteFromResourcesOperationState.cs similarity index 61% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesOperationState.cs index 4e1ee9ed2c1c..65f2d903d0b5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentDeleteFromResourcesOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of an existing delete deployment from specific resources job. - public partial class DeploymentDeleteFromResourcesJobState + public partial class DeploymentDeleteFromResourcesOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class DeploymentDeleteFromResourcesJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal DeploymentDeleteFromResourcesOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal DeploymentDeleteFromResourcesOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DeploymentDeleteFromResourcesJobState() + /// Initializes a new instance of for deserialization. + internal DeploymentDeleteFromResourcesOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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/DeploymentOperationState.Serialization.cs similarity index 70% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentOperationState.Serialization.cs index bc975cd541a8..37eda7b4d8b8 100644 --- 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/DeploymentOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class DeploymentJobState : IUtf8JsonSerializable, IJsonModel + public partial class DeploymentOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// 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; + 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."); + throw new FormatException($"The model {nameof(DeploymentOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DeploymentJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DeploymentOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDeploymentJobState(document.RootElement, options); + return DeserializeDeploymentOperationState(document.RootElement, options); } - internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static DeploymentOperationState DeserializeDeploymentOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement ele DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement ele } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static DeploymentJobState DeserializeDeploymentJobState(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new DeploymentJobState( + return new DeploymentOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentOperationState)} does not support writing '{options.Format}' format."); } } - DeploymentJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DeploymentOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeDeploymentOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DeploymentJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DeploymentOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static DeploymentOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDeploymentJobState(document.RootElement); + return DeserializeDeploymentOperationState(document.RootElement); } /// Convert into a . 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/DeploymentOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentOperationState.cs index 3b027b6d8460..5b928b73d7fb 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a deployment job. - public partial class DeploymentJobState + public partial class DeploymentOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class DeploymentJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal DeploymentOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal DeploymentOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DeploymentJobState() + /// Initializes a new instance of for deserialization. + internal DeploymentOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { 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/DeploymentResourcesOperationState.Serialization.cs similarity index 67% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesOperationState.Serialization.cs index 2d5ee327c04c..f8b03f9cc669 100644 --- 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/DeploymentResourcesOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ExportedModelJobState : IUtf8JsonSerializable, IJsonModel + public partial class DeploymentResourcesOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + 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."); + throw new FormatException($"The model {nameof(DeploymentResourcesOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportedModelJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DeploymentResourcesOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentResourcesOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportedModelJobState(document.RootElement, options); + return DeserializeDeploymentResourcesOperationState(document.RootElement, options); } - internal static ExportedModelJobState DeserializeExportedModelJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static DeploymentResourcesOperationState DeserializeDeploymentResourcesOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static ExportedModelJobState DeserializeExportedModelJobState(JsonEleme DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static ExportedModelJobState DeserializeExportedModelJobState(JsonEleme } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static ExportedModelJobState DeserializeExportedModelJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static ExportedModelJobState DeserializeExportedModelJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static ExportedModelJobState DeserializeExportedModelJobState(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new ExportedModelJobState( + return new DeploymentResourcesOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(DeploymentResourcesOperationState)} does not support writing '{options.Format}' format."); } } - ExportedModelJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DeploymentResourcesOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeDeploymentResourcesOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ExportedModelJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DeploymentResourcesOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static DeploymentResourcesOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeExportedModelJobState(document.RootElement); + return DeserializeDeploymentResourcesOperationState(document.RootElement); } /// Convert into a . 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/DeploymentResourcesOperationState.cs similarity index 61% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesOperationState.cs index 1448217b4dbd..99dcb15d0e01 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a deployment resources job. - public partial class DeploymentResourcesJobState + public partial class DeploymentResourcesOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class DeploymentResourcesJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal DeploymentResourcesOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal DeploymentResourcesOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DeploymentResourcesJobState() + /// Initializes a new instance of for deserialization. + internal DeploymentResourcesOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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 index c47755962689..48722ae7d417 100644 --- 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 @@ -35,7 +35,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("confusionMatrix"u8); - writer.WriteObjectValue(ConfusionMatrix, options); + writer.WriteStartObject(); + foreach (var item in ConfusionMatrix) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); writer.WritePropertyName("entities"u8); writer.WriteStartObject(); foreach (var item in Entities) @@ -93,7 +99,7 @@ internal static EntitiesEvaluationSummary DeserializeEntitiesEvaluationSummary(J { return null; } - ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary confusionMatrix = default; IReadOnlyDictionary entities = default; float microF1 = default; float microPrecision = default; @@ -107,7 +113,12 @@ internal static EntitiesEvaluationSummary DeserializeEntitiesEvaluationSummary(J { if (property.NameEquals("confusionMatrix"u8)) { - confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AnalyzeConversationConfusionMatrixRow.DeserializeAnalyzeConversationConfusionMatrixRow(property0.Value, options)); + } + confusionMatrix = dictionary; continue; } if (property.NameEquals("entities"u8)) 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 index 1ba5c2a42ed7..abcdd42d4bee 100644 --- 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 @@ -55,7 +55,7 @@ public partial class EntitiesEvaluationSummary /// 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) + internal EntitiesEvaluationSummary(IReadOnlyDictionary 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)); @@ -80,7 +80,7 @@ internal EntitiesEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDic /// 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) + internal EntitiesEvaluationSummary(IReadOnlyDictionary confusionMatrix, IReadOnlyDictionary entities, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) { ConfusionMatrix = confusionMatrix; Entities = entities; @@ -99,7 +99,7 @@ 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; } + public IReadOnlyDictionary 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. 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 index 131743f41f7b..3b208c7b2078 100644 --- 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 @@ -46,9 +46,9 @@ public partial class EntityEvaluationSummary private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Represents the model precision. - /// Represents the model recall. - /// Represents the model F1 score. + /// Represents the model F1 score. + /// Represents the model precision. + /// Represents the model precision. /// Represents the count of true positive. /// Represents the count of true negative. /// Represents the count of false positive. @@ -65,9 +65,9 @@ internal EntityEvaluationSummary(double f1, double precision, double recall, int } /// Initializes a new instance of . - /// Represents the model precision. - /// Represents the model recall. - /// Represents the model F1 score. + /// Represents the model F1 score. + /// Represents the model precision. + /// Represents the model precision. /// Represents the count of true positive. /// Represents the count of true negative. /// Represents the count of false positive. @@ -90,11 +90,11 @@ internal EntityEvaluationSummary() { } - /// Represents the model precision. + /// Represents the model F1 score. public double F1 { get; } - /// Represents the model recall. + /// Represents the model precision. public double Precision { get; } - /// Represents the model F1 score. + /// Represents the model precision. public double Recall { get; } /// Represents the count of true positive. public int TruePositiveCount { 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 deleted file mode 100644 index 977595b99c5f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ErrorCode.cs +++ /dev/null @@ -1,99 +0,0 @@ -// 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 index 2a72e648962b..c05e8ca54a40 100644 --- 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 @@ -86,7 +86,7 @@ internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement eleme { return null; } - EvaluationKind? kind = default; + AnalyzeConversationAuthoringEvaluationKind? kind = default; int? trainingSplitPercentage = default; int? testingSplitPercentage = default; IDictionary serializedAdditionalRawData = default; @@ -99,7 +99,7 @@ internal static EvaluationDetails DeserializeEvaluationDetails(JsonElement eleme { continue; } - kind = new EvaluationKind(property.Value.GetString()); + kind = new AnalyzeConversationAuthoringEvaluationKind(property.Value.GetString()); continue; } if (property.NameEquals("trainingSplitPercentage"u8)) 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 index c843e5d23f9b..97bbced16746 100644 --- 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 @@ -55,7 +55,7 @@ public EvaluationDetails() /// 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) + internal EvaluationDetails(AnalyzeConversationAuthoringEvaluationKind? kind, int? trainingSplitPercentage, int? testingSplitPercentage, IDictionary serializedAdditionalRawData) { Kind = kind; TrainingSplitPercentage = trainingSplitPercentage; @@ -64,7 +64,7 @@ internal EvaluationDetails(EvaluationKind? kind, int? trainingSplitPercentage, i } /// Represents the evaluation kind. By default, the evaluation kind is set to percentage. - public EvaluationKind? Kind { get; set; } + public AnalyzeConversationAuthoringEvaluationKind? 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. 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 index a42d020c0f60..77f0477cef1d 100644 --- 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 @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("evaluationOptions"u8); - writer.WriteObjectValue(EvaluationOptions, options); + writer.WriteObjectValue(EvaluationDetails, options); writer.WritePropertyName("modelLabel"u8); writer.WriteStringValue(ModelLabel); writer.WritePropertyName("trainingConfigVersion"u8); 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 index 66c98233abbd..04a4e22891d8 100644 --- 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 @@ -46,32 +46,32 @@ public partial class EvaluationJobResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Represents the options used running the evaluation. + /// 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) + /// , or is null. + internal EvaluationJobResult(EvaluationDetails evaluationDetails, string modelLabel, string trainingConfigVersion, int percentComplete) { - Argument.AssertNotNull(evaluationOptions, nameof(evaluationOptions)); + Argument.AssertNotNull(evaluationDetails, nameof(evaluationDetails)); Argument.AssertNotNull(modelLabel, nameof(modelLabel)); Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); - EvaluationOptions = evaluationOptions; + EvaluationDetails = evaluationDetails; ModelLabel = modelLabel; TrainingConfigVersion = trainingConfigVersion; PercentComplete = percentComplete; } /// Initializes a new instance of . - /// Represents the options used running the evaluation. + /// 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) + internal EvaluationJobResult(EvaluationDetails evaluationDetails, string modelLabel, string trainingConfigVersion, int percentComplete, IDictionary serializedAdditionalRawData) { - EvaluationOptions = evaluationOptions; + EvaluationDetails = evaluationDetails; ModelLabel = modelLabel; TrainingConfigVersion = trainingConfigVersion; PercentComplete = percentComplete; @@ -84,7 +84,7 @@ internal EvaluationJobResult() } /// Represents the options used running the evaluation. - public EvaluationDetails EvaluationOptions { get; } + public EvaluationDetails EvaluationDetails { get; } /// Represents trained model label. public string ModelLabel { get; } /// Represents training config version. 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 deleted file mode 100644 index 9b1349bc8470..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationKind.cs +++ /dev/null @@ -1,51 +0,0 @@ -// 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/EvaluationJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationOperationState.Serialization.cs similarity index 71% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationOperationState.Serialization.cs index 724796e50c91..7c6d950acc0d 100644 --- 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/EvaluationOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class EvaluationJobState : IUtf8JsonSerializable, IJsonModel + public partial class EvaluationOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// 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; + 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."); + throw new FormatException($"The model {nameof(EvaluationOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -89,19 +89,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - EvaluationJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EvaluationOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(EvaluationOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEvaluationJobState(document.RootElement, options); + return DeserializeEvaluationOperationState(document.RootElement, options); } - internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static EvaluationOperationState DeserializeEvaluationOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -113,9 +113,9 @@ internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement ele DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; EvaluationJobResult result = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -147,7 +147,7 @@ internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement ele } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -156,10 +156,10 @@ internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -170,10 +170,10 @@ internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -189,55 +189,55 @@ internal static EvaluationJobState DeserializeEvaluationJobState(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new EvaluationJobState( + return new EvaluationOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), result, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(EvaluationOperationState)} does not support writing '{options.Format}' format."); } } - EvaluationJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EvaluationOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeEvaluationOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EvaluationJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EvaluationOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static EvaluationOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEvaluationJobState(document.RootElement); + return DeserializeEvaluationOperationState(document.RootElement); } /// Convert into a . 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/EvaluationOperationState.cs similarity index 65% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationOperationState.cs index fba4e55b822e..6f6a5cd647b1 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/EvaluationOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a evaluation job. - public partial class EvaluationJobState + public partial class EvaluationOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,40 +45,40 @@ public partial class EvaluationJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal EvaluationOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status, EvaluationJobResult result) { Argument.AssertNotNull(result, nameof(result)); - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); Result = result; } - /// Initializes a new instance of . + /// 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 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) + internal EvaluationOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, EvaluationJobResult result, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; @@ -86,25 +86,25 @@ internal EvaluationJobState(string jobId, DateTimeOffset createdDateTime, DateTi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal EvaluationJobState() + /// Initializes a new instance of for deserialization. + internal EvaluationOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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/ExportProjectJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectOperationState.Serialization.cs index 954191e78e64..460d4f0d4ecf 100644 --- 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/ExportProjectOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ExportProjectJobState : IUtf8JsonSerializable, IJsonModel + public partial class ExportProjectOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + 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."); + throw new FormatException($"The model {nameof(ExportProjectOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,14 +66,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } - if (Optional.IsDefined(ResultUrl)) + if (Optional.IsDefined(ResultUri)) { writer.WritePropertyName("resultUrl"u8); - writer.WriteStringValue(ResultUrl); + writer.WriteStringValue(ResultUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -92,19 +92,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportProjectOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportProjectOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportProjectJobState(document.RootElement, options); + return DeserializeExportProjectOperationState(document.RootElement, options); } - internal static ExportProjectJobState DeserializeExportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportProjectOperationState DeserializeExportProjectOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -116,9 +116,9 @@ internal static ExportProjectJobState DeserializeExportProjectJobState(JsonEleme DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; string resultUrl = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -150,7 +150,7 @@ internal static ExportProjectJobState DeserializeExportProjectJobState(JsonEleme } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -159,10 +159,10 @@ internal static ExportProjectJobState DeserializeExportProjectJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -173,10 +173,10 @@ internal static ExportProjectJobState DeserializeExportProjectJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -192,55 +192,55 @@ internal static ExportProjectJobState DeserializeExportProjectJobState(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new ExportProjectJobState( + return new ExportProjectOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), resultUrl, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportProjectOperationState)} does not support writing '{options.Format}' format."); } } - ExportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportProjectOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeExportProjectOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ExportProjectJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportProjectOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static ExportProjectOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeExportProjectJobState(document.RootElement); + return DeserializeExportProjectOperationState(document.RootElement); } /// Convert into a . 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/ExportProjectOperationState.cs similarity index 61% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectOperationState.cs index 3ba56b46d8d9..4a9374f458c3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportProjectOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of an export job. - public partial class ExportProjectJobState + public partial class ExportProjectOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,62 +45,62 @@ public partial class ExportProjectJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal ExportProjectOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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. + /// 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) + internal ExportProjectOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, string resultUri, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; - ResultUrl = resultUrl; + ResultUri = resultUri; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ExportProjectJobState() + /// Initializes a new instance of for deserialization. + internal ExportProjectOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { get; } /// The URL to use in order to download the exported project. - public string ResultUrl { get; } + public string ResultUri { 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/ExportedModelOperationState.Serialization.cs similarity index 72% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/DeploymentResourcesJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelOperationState.Serialization.cs index c868942c403f..02ca890bee6f 100644 --- 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/ExportedModelOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class DeploymentResourcesJobState : IUtf8JsonSerializable, IJsonModel + public partial class ExportedModelOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// 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; + 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."); + throw new FormatException($"The model {nameof(ExportedModelOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DeploymentResourcesJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedModelOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedModelOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDeploymentResourcesJobState(document.RootElement, options); + return DeserializeExportedModelOperationState(document.RootElement, options); } - internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedModelOperationState DeserializeExportedModelOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobSta DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobSta } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobSta { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobSta { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static DeploymentResourcesJobState DeserializeDeploymentResourcesJobSta } } serializedAdditionalRawData = rawDataDictionary; - return new DeploymentResourcesJobState( + return new ExportedModelOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedModelOperationState)} does not support writing '{options.Format}' format."); } } - DeploymentResourcesJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedModelOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeExportedModelOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DeploymentResourcesJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedModelOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static ExportedModelOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDeploymentResourcesJobState(document.RootElement); + return DeserializeExportedModelOperationState(document.RootElement); } /// Convert into a . 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/ExportedModelOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelOperationState.cs index 639c21edbf42..62b3628da129 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedModelOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a job to create or updated an exported model. - public partial class ExportedModelJobState + public partial class ExportedModelOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class ExportedModelJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal ExportedModelOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal ExportedModelOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ExportedModelJobState() + /// Initializes a new instance of for deserialization. + internal ExportedModelOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { 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 index c27bdef7d60f..571b085dbd0e 100644 --- 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 @@ -85,7 +85,7 @@ internal static ExportedProject DeserializeExportedProject(JsonElement element, string projectFileVersion = default; StringIndexType stringIndexType = default; CreateProjectDetails metadata = default; - ExportedProjectAssets assets = default; + ExportedProjectAsset assets = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,7 +111,7 @@ internal static ExportedProject DeserializeExportedProject(JsonElement element, { continue; } - assets = ExportedProjectAssets.DeserializeExportedProjectAssets(property.Value, options); + assets = ExportedProjectAsset.DeserializeExportedProjectAsset(property.Value, options); continue; } if (options.Format != "W") 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 index 75bdf301aa5e..fe001c28b4c7 100644 --- 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 @@ -66,11 +66,11 @@ public ExportedProject(string projectFileVersion, StringIndexType stringIndexTyp /// 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 . + /// 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) + internal ExportedProject(string projectFileVersion, StringIndexType stringIndexType, CreateProjectDetails metadata, ExportedProjectAsset assets, IDictionary serializedAdditionalRawData) { ProjectFileVersion = projectFileVersion; StringIndexType = stringIndexType; @@ -92,9 +92,9 @@ internal ExportedProject() 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 . + /// 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; } + public ExportedProjectAsset 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/ExportedProjectAsset.Serialization.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAsset.Serialization.cs index 6fe2e7b2ffc0..a7fa5a4666e5 100644 --- 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/ExportedProjectAsset.Serialization.cs @@ -12,12 +12,12 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - [PersistableModelProxy(typeof(UnknownExportedProjectAssets))] - public partial class ExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + [PersistableModelProxy(typeof(UnknownExportedProjectAsset))] + public partial class ExportedProjectAsset : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support writing '{format}' format."); } writer.WritePropertyName("projectKind"u8); @@ -53,19 +53,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedProjectAsset IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportedProjectAssets(document.RootElement, options); + return DeserializeExportedProjectAsset(document.RootElement, options); } - internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + internal static ExportedProjectAsset DeserializeExportedProjectAsset(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -77,50 +77,50 @@ internal static ExportedProjectAssets DeserializeExportedProjectAssets(JsonEleme { switch (discriminator.GetString()) { - case "Conversation": return ConversationExportedProjectAssets.DeserializeConversationExportedProjectAssets(element, options); - case "Orchestration": return OrchestrationExportedProjectAssets.DeserializeOrchestrationExportedProjectAssets(element, options); + case "Conversation": return ConversationExportedProjectAsset.DeserializeConversationExportedProjectAsset(element, options); + case "Orchestration": return OrchestrationExportedProjectAsset.DeserializeOrchestrationExportedProjectAsset(element, options); } } - return UnknownExportedProjectAssets.DeserializeUnknownExportedProjectAssets(element, options); + return UnknownExportedProjectAsset.DeserializeUnknownExportedProjectAsset(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support writing '{options.Format}' format."); } } - ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedProjectAsset IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeExportedProjectAsset(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static ExportedProjectAsset FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeExportedProjectAssets(document.RootElement); + return DeserializeExportedProjectAsset(document.RootElement); } /// Convert into a . 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/ExportedProjectAsset.cs similarity index 76% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAsset.cs index c039092126af..935011cbadde 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAssets.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectAsset.cs @@ -12,10 +12,10 @@ 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 . + /// 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 + public abstract partial class ExportedProjectAsset { /// /// Keeps track of any properties unknown to the library. @@ -49,21 +49,21 @@ public abstract partial class ExportedProjectAssets /// private protected IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - protected ExportedProjectAssets() + /// Initializes a new instance of . + protected ExportedProjectAsset() { } - /// Initializes a new instance of . + /// 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) + internal ExportedProjectAsset(AnalyzeConversationAuthoringProjectKind projectKind, IDictionary serializedAdditionalRawData) { ProjectKind = projectKind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The type of project containing the assets. - internal ProjectKind ProjectKind { get; set; } + internal AnalyzeConversationAuthoringProjectKind 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 deleted file mode 100644 index 2792adaccde8..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedProjectFormat.cs +++ /dev/null @@ -1,51 +0,0 @@ -// 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/ExportedTrainedModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ExportedTrainedModel.Serialization.cs index bde241606e97..5c5da77c38ee 100644 --- 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 @@ -42,11 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("modelId"u8); writer.WriteStringValue(ModelId); writer.WritePropertyName("lastTrainedDateTime"u8); - writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WriteStringValue(LastTrainedOn, "O"); writer.WritePropertyName("lastExportedModelDateTime"u8); - writer.WriteStringValue(LastExportedModelDateTime, "O"); + writer.WriteStringValue(LastExportedModelOn, "O"); writer.WritePropertyName("modelExpirationDate"u8); - writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WriteStringValue(ModelExpiredOn, "D"); writer.WritePropertyName("modelTrainingConfigVersion"u8); writer.WriteStringValue(ModelTrainingConfigVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) 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 index 6f4b7d525f73..799e21a9fcbf 100644 --- 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 @@ -47,38 +47,38 @@ public partial class ExportedTrainedModel /// 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 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) + internal ExportedTrainedModel(string modelId, DateTimeOffset lastTrainedOn, DateTimeOffset lastExportedModelOn, DateTimeOffset modelExpiredOn, string modelTrainingConfigVersion) { Argument.AssertNotNull(modelId, nameof(modelId)); Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); ModelId = modelId; - LastTrainedDateTime = lastTrainedDateTime; - LastExportedModelDateTime = lastExportedModelDateTime; - ModelExpirationDate = modelExpirationDate; + LastTrainedOn = lastTrainedOn; + LastExportedModelOn = lastExportedModelOn; + ModelExpiredOn = modelExpiredOn; 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 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) + internal ExportedTrainedModel(string exportedModelName, string modelId, DateTimeOffset lastTrainedOn, DateTimeOffset lastExportedModelOn, DateTimeOffset modelExpiredOn, string modelTrainingConfigVersion, IDictionary serializedAdditionalRawData) { ExportedModelName = exportedModelName; ModelId = modelId; - LastTrainedDateTime = lastTrainedDateTime; - LastExportedModelDateTime = lastExportedModelDateTime; - ModelExpirationDate = modelExpirationDate; + LastTrainedOn = lastTrainedOn; + LastExportedModelOn = lastExportedModelOn; + ModelExpiredOn = modelExpiredOn; ModelTrainingConfigVersion = modelTrainingConfigVersion; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,11 +93,11 @@ internal ExportedTrainedModel() /// The model ID. public string ModelId { get; } /// The last trained date time of the model. - public DateTimeOffset LastTrainedDateTime { get; } + public DateTimeOffset LastTrainedOn { get; } /// The last exported date time of the model. - public DateTimeOffset LastExportedModelDateTime { get; } + public DateTimeOffset LastExportedModelOn { get; } /// The model expiration date. - public DateTimeOffset ModelExpirationDate { get; } + public DateTimeOffset ModelExpiredOn { get; } /// The model training config version. public string ModelTrainingConfigVersion { 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/ImportProjectOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectOperationState.Serialization.cs index 3374f0e5bb6c..88186b124967 100644 --- 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/ImportProjectOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ImportProjectJobState : IUtf8JsonSerializable, IJsonModel + public partial class ImportProjectOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + 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."); + throw new FormatException($"The model {nameof(ImportProjectOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ImportProjectJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ImportProjectOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ImportProjectOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeImportProjectJobState(document.RootElement, options); + return DeserializeImportProjectOperationState(document.RootElement, options); } - internal static ImportProjectJobState DeserializeImportProjectJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static ImportProjectOperationState DeserializeImportProjectOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static ImportProjectJobState DeserializeImportProjectJobState(JsonEleme DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static ImportProjectJobState DeserializeImportProjectJobState(JsonEleme } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static ImportProjectJobState DeserializeImportProjectJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static ImportProjectJobState DeserializeImportProjectJobState(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static ImportProjectJobState DeserializeImportProjectJobState(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new ImportProjectJobState( + return new ImportProjectOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ImportProjectOperationState)} does not support writing '{options.Format}' format."); } } - ImportProjectJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ImportProjectOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeImportProjectOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ImportProjectJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ImportProjectOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static ImportProjectOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeImportProjectJobState(document.RootElement); + return DeserializeImportProjectOperationState(document.RootElement); } /// Convert into a . 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/ImportProjectOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectOperationState.cs index 99a71bdd2853..2aac43ba14a8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ImportProjectOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of an import job. - public partial class ImportProjectJobState + public partial class ImportProjectOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class ImportProjectJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal ImportProjectOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal ImportProjectOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ImportProjectJobState() + /// Initializes a new instance of for deserialization. + internal ImportProjectOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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 deleted file mode 100644 index 8fec0f3a7d94..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorCode.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.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 deleted file mode 100644 index 3b9e7a409497..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.Serialization.cs +++ /dev/null @@ -1,208 +0,0 @@ -// 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 deleted file mode 100644 index 0be6c1135e2f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/InnerErrorModel.cs +++ /dev/null @@ -1,94 +0,0 @@ -// 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/IntentsEvaluationSummary.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/IntentsEvaluationSummary.Serialization.cs index 3baff424fa3e..7cd6295bf56c 100644 --- 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 @@ -35,7 +35,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("confusionMatrix"u8); - writer.WriteObjectValue(ConfusionMatrix, options); + writer.WriteStartObject(); + foreach (var item in ConfusionMatrix) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); writer.WritePropertyName("intents"u8); writer.WriteStartObject(); foreach (var item in Intents) @@ -93,7 +99,7 @@ internal static IntentsEvaluationSummary DeserializeIntentsEvaluationSummary(Jso { return null; } - ConfusionMatrix confusionMatrix = default; + IReadOnlyDictionary confusionMatrix = default; IReadOnlyDictionary intents = default; float microF1 = default; float microPrecision = default; @@ -107,7 +113,12 @@ internal static IntentsEvaluationSummary DeserializeIntentsEvaluationSummary(Jso { if (property.NameEquals("confusionMatrix"u8)) { - confusionMatrix = ConfusionMatrix.DeserializeConfusionMatrix(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, AnalyzeConversationConfusionMatrixRow.DeserializeAnalyzeConversationConfusionMatrixRow(property0.Value, options)); + } + confusionMatrix = dictionary; continue; } if (property.NameEquals("intents"u8)) 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 index ac6b62876b0c..b846a7ed1db6 100644 --- 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 @@ -55,7 +55,7 @@ public partial class IntentsEvaluationSummary /// 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) + internal IntentsEvaluationSummary(IReadOnlyDictionary 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)); @@ -80,7 +80,7 @@ internal IntentsEvaluationSummary(ConfusionMatrix confusionMatrix, IReadOnlyDict /// 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) + internal IntentsEvaluationSummary(IReadOnlyDictionary confusionMatrix, IReadOnlyDictionary intents, float microF1, float microPrecision, float microRecall, float macroF1, float macroPrecision, float macroRecall, IDictionary serializedAdditionalRawData) { ConfusionMatrix = confusionMatrix; Intents = intents; @@ -99,7 +99,7 @@ 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; } + public IReadOnlyDictionary 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. 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 deleted file mode 100644 index e87ebd045098..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/JobStatus.cs +++ /dev/null @@ -1,66 +0,0 @@ -// 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/LoadSnapshotOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotOperationState.Serialization.cs index dc0a7a52e26b..a1fae3ffd070 100644 --- 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/LoadSnapshotOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class LoadSnapshotJobState : IUtf8JsonSerializable, IJsonModel + public partial class LoadSnapshotOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr /// 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; + 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."); + throw new FormatException($"The model {nameof(LoadSnapshotOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - LoadSnapshotJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + LoadSnapshotOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(LoadSnapshotOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeLoadSnapshotJobState(document.RootElement, options); + return DeserializeLoadSnapshotOperationState(document.RootElement, options); } - internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static LoadSnapshotOperationState DeserializeLoadSnapshotOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static LoadSnapshotJobState DeserializeLoadSnapshotJobState(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new LoadSnapshotJobState( + return new LoadSnapshotOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(LoadSnapshotOperationState)} does not support writing '{options.Format}' format."); } } - LoadSnapshotJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + LoadSnapshotOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeLoadSnapshotOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(LoadSnapshotJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(LoadSnapshotOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static LoadSnapshotOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeLoadSnapshotJobState(document.RootElement); + return DeserializeLoadSnapshotOperationState(document.RootElement); } /// Convert into a . 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/LoadSnapshotOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotOperationState.cs index d36674e9524d..9f152c656263 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/LoadSnapshotOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of loading a snapshot job. - public partial class LoadSnapshotJobState + public partial class LoadSnapshotOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class LoadSnapshotJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal LoadSnapshotOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal LoadSnapshotOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal LoadSnapshotJobState() + /// Initializes a new instance of for deserialization. + internal LoadSnapshotOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { 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/OrchestrationExportedProjectAsset.Serialization.cs similarity index 70% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAsset.Serialization.cs index 7f1f869f122c..c3ad9998a490 100644 --- 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/OrchestrationExportedProjectAsset.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class OrchestrationExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + public partial class OrchestrationExportedProjectAsset : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter 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; + 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."); + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAsset)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -57,19 +57,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - OrchestrationExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OrchestrationExportedProjectAsset IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAsset)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOrchestrationExportedProjectAssets(document.RootElement, options); + return DeserializeOrchestrationExportedProjectAsset(document.RootElement, options); } - internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + internal static OrchestrationExportedProjectAsset DeserializeOrchestrationExportedProjectAsset(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -79,7 +79,7 @@ internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExpor } IList intents = default; IList utterances = default; - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -114,7 +114,7 @@ internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExpor } if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -123,46 +123,46 @@ internal static OrchestrationExportedProjectAssets DeserializeOrchestrationExpor } } serializedAdditionalRawData = rawDataDictionary; - return new OrchestrationExportedProjectAssets(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); + return new OrchestrationExportedProjectAsset(projectKind, serializedAdditionalRawData, intents ?? new ChangeTrackingList(), utterances ?? new ChangeTrackingList()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAsset)} does not support writing '{options.Format}' format."); } } - OrchestrationExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OrchestrationExportedProjectAsset IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeOrchestrationExportedProjectAsset(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(OrchestrationExportedProjectAssets)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OrchestrationExportedProjectAsset)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static new OrchestrationExportedProjectAsset FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeOrchestrationExportedProjectAssets(document.RootElement); + return DeserializeOrchestrationExportedProjectAsset(document.RootElement); } /// Convert into a . 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/OrchestrationExportedProjectAsset.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAsset.cs index 1b4e9d3b238c..4a860cd82e92 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAssets.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/OrchestrationExportedProjectAsset.cs @@ -11,22 +11,22 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the assets of an orchestration project. - public partial class OrchestrationExportedProjectAssets : ExportedProjectAssets + public partial class OrchestrationExportedProjectAsset : ExportedProjectAsset { - /// Initializes a new instance of . - public OrchestrationExportedProjectAssets() + /// Initializes a new instance of . + public OrchestrationExportedProjectAsset() { - ProjectKind = ProjectKind.Orchestration; + ProjectKind = AnalyzeConversationAuthoringProjectKind.Orchestration; Intents = new ChangeTrackingList(); Utterances = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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) + internal OrchestrationExportedProjectAsset(AnalyzeConversationAuthoringProjectKind projectKind, IDictionary serializedAdditionalRawData, IList intents, IList utterances) : base(projectKind, serializedAdditionalRawData) { Intents = intents; Utterances = utterances; 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 deleted file mode 100644 index 3ed3090a697d..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// 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 deleted file mode 100644 index b391e65ae007..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/PrebuiltEntities.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using 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 index 053665c47c53..cb42a671a12a 100644 --- 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 @@ -34,8 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PrebuiltEntity)} does not support writing '{format}' format."); } - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category); + if (options.Format != "W") + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); writer.WritePropertyName("examples"u8); 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 index d0bfaf84131e..a8a44af01950 100644 --- 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 @@ -46,17 +46,14 @@ public partial class PrebuiltEntity 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) + /// or is null. + internal PrebuiltEntity(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; } 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/ProjectDeletionOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionOperationState.Serialization.cs index 0126c905da8f..faadf9966b26 100644 --- 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/ProjectDeletionOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class ProjectDeletionJobState : IUtf8JsonSerializable, IJsonModel + public partial class ProjectDeletionOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// 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; + 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."); + throw new FormatException($"The model {nameof(ProjectDeletionOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ProjectDeletionJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ProjectDeletionOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ProjectDeletionOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeProjectDeletionJobState(document.RootElement, options); + return DeserializeProjectDeletionOperationState(document.RootElement, options); } - internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static ProjectDeletionOperationState DeserializeProjectDeletionOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonE DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonE } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static ProjectDeletionJobState DeserializeProjectDeletionJobState(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new ProjectDeletionJobState( + return new ProjectDeletionOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ProjectDeletionOperationState)} does not support writing '{options.Format}' format."); } } - ProjectDeletionJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ProjectDeletionOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeProjectDeletionOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ProjectDeletionJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ProjectDeletionOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static ProjectDeletionOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeProjectDeletionJobState(document.RootElement); + return DeserializeProjectDeletionOperationState(document.RootElement); } /// Convert into a . 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/ProjectDeletionOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionOperationState.cs index 6a51e6c587e7..8b8bf193ec48 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectDeletionOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a project deletion job. - public partial class ProjectDeletionJobState + public partial class ProjectDeletionOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class ProjectDeletionJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal ProjectDeletionOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal ProjectDeletionOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ProjectDeletionJobState() + /// Initializes a new instance of for deserialization. + internal ProjectDeletionOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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 index 2cd30a980287..cd9badd71875 100644 --- 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 @@ -42,11 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("modelId"u8); writer.WriteStringValue(ModelId); writer.WritePropertyName("lastTrainedDateTime"u8); - writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WriteStringValue(LastTrainedOn, "O"); writer.WritePropertyName("lastDeployedDateTime"u8); - writer.WriteStringValue(LastDeployedDateTime, "O"); + writer.WriteStringValue(LastDeployedOn, "O"); writer.WritePropertyName("deploymentExpirationDate"u8); - writer.WriteStringValue(DeploymentExpirationDate, "D"); + writer.WriteStringValue(DeploymentExpiredOn, "D"); writer.WritePropertyName("modelTrainingConfigVersion"u8); writer.WriteStringValue(ModelTrainingConfigVersion); writer.WritePropertyName("assignedResources"u8); 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 index ef0a3c0feb3e..103dcb92c800 100644 --- 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 @@ -48,22 +48,22 @@ public partial class ProjectDeployment /// 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 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) + internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedOn, DateTimeOffset lastDeployedOn, DateTimeOffset deploymentExpiredOn, 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; + LastTrainedOn = lastTrainedOn; + LastDeployedOn = lastDeployedOn; + DeploymentExpiredOn = deploymentExpiredOn; ModelTrainingConfigVersion = modelTrainingConfigVersion; AssignedResources = assignedResources.ToList(); } @@ -71,19 +71,19 @@ internal ProjectDeployment(string modelId, DateTimeOffset lastTrainedDateTime, D /// 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 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) + internal ProjectDeployment(string deploymentName, string modelId, DateTimeOffset lastTrainedOn, DateTimeOffset lastDeployedOn, DateTimeOffset deploymentExpiredOn, string modelTrainingConfigVersion, IReadOnlyList assignedResources, IDictionary serializedAdditionalRawData) { DeploymentName = deploymentName; ModelId = modelId; - LastTrainedDateTime = lastTrainedDateTime; - LastDeployedDateTime = lastDeployedDateTime; - DeploymentExpirationDate = deploymentExpirationDate; + LastTrainedOn = lastTrainedOn; + LastDeployedOn = lastDeployedOn; + DeploymentExpiredOn = deploymentExpiredOn; ModelTrainingConfigVersion = modelTrainingConfigVersion; AssignedResources = assignedResources; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -99,11 +99,11 @@ internal ProjectDeployment() /// Represents deployment modelId. public string ModelId { get; } /// Represents deployment last trained time. - public DateTimeOffset LastTrainedDateTime { get; } + public DateTimeOffset LastTrainedOn { get; } /// Represents deployment last deployed time. - public DateTimeOffset LastDeployedDateTime { get; } + public DateTimeOffset LastDeployedOn { get; } /// Represents deployment expiration date in the runtime. - public DateTimeOffset DeploymentExpirationDate { get; } + public DateTimeOffset DeploymentExpiredOn { get; } /// Represents model training config version. public string ModelTrainingConfigVersion { get; } /// Represents the metadata of the assigned Azure resources. 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 deleted file mode 100644 index d673512f2717..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/ProjectKind.cs +++ /dev/null @@ -1,54 +0,0 @@ -// 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 index 1702bef36f89..537b270b85d2 100644 --- 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 @@ -35,18 +35,18 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastModifiedDateTime"u8); - writer.WriteStringValue(LastModifiedDateTime, "O"); - if (Optional.IsDefined(LastTrainedDateTime)) + writer.WriteStringValue(LastModifiedOn, "O"); + if (Optional.IsDefined(LastTrainedOn)) { writer.WritePropertyName("lastTrainedDateTime"u8); - writer.WriteStringValue(LastTrainedDateTime.Value, "O"); + writer.WriteStringValue(LastTrainedOn.Value, "O"); } - if (Optional.IsDefined(LastDeployedDateTime)) + if (Optional.IsDefined(LastDeployedOn)) { writer.WritePropertyName("lastDeployedDateTime"u8); - writer.WriteStringValue(LastDeployedDateTime.Value, "O"); + writer.WriteStringValue(LastDeployedOn.Value, "O"); } writer.WritePropertyName("projectKind"u8); writer.WriteStringValue(ProjectKind.ToString()); @@ -115,7 +115,7 @@ internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, DateTimeOffset lastModifiedDateTime = default; DateTimeOffset? lastTrainedDateTime = default; DateTimeOffset? lastDeployedDateTime = default; - ProjectKind projectKind = default; + AnalyzeConversationAuthoringProjectKind projectKind = default; ProjectSettings settings = default; string storageInputContainerName = default; string projectName = default; @@ -156,7 +156,7 @@ internal static ProjectMetadata DeserializeProjectMetadata(JsonElement element, } if (property.NameEquals("projectKind"u8)) { - projectKind = new ProjectKind(property.Value.GetString()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (property.NameEquals("settings"u8)) 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 index c8e18988fe7e..7b7b63c9386a 100644 --- 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 @@ -46,29 +46,29 @@ public partial class ProjectMetadata private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Represents the project creation datetime. - /// Represents the project creation datetime. + /// 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) + internal ProjectMetadata(DateTimeOffset createdOn, DateTimeOffset lastModifiedOn, AnalyzeConversationAuthoringProjectKind projectKind, string projectName, string language) { Argument.AssertNotNull(projectName, nameof(projectName)); Argument.AssertNotNull(language, nameof(language)); - CreatedDateTime = createdDateTime; - LastModifiedDateTime = lastModifiedDateTime; + CreatedOn = createdOn; + LastModifiedOn = lastModifiedOn; 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 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. @@ -77,12 +77,12 @@ internal ProjectMetadata(DateTimeOffset createdDateTime, DateTimeOffset lastModi /// 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) + internal ProjectMetadata(DateTimeOffset createdOn, DateTimeOffset lastModifiedOn, DateTimeOffset? lastTrainedOn, DateTimeOffset? lastDeployedOn, AnalyzeConversationAuthoringProjectKind projectKind, ProjectSettings settings, string storageInputContainerName, string projectName, bool? multilingual, string description, string language, IDictionary serializedAdditionalRawData) { - CreatedDateTime = createdDateTime; - LastModifiedDateTime = lastModifiedDateTime; - LastTrainedDateTime = lastTrainedDateTime; - LastDeployedDateTime = lastDeployedDateTime; + CreatedOn = createdOn; + LastModifiedOn = lastModifiedOn; + LastTrainedOn = lastTrainedOn; + LastDeployedOn = lastDeployedOn; ProjectKind = projectKind; Settings = settings; StorageInputContainerName = storageInputContainerName; @@ -99,15 +99,15 @@ internal ProjectMetadata() } /// Represents the project creation datetime. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// Represents the project creation datetime. - public DateTimeOffset LastModifiedDateTime { get; } + public DateTimeOffset LastModifiedOn { get; } /// Represents the project last trained datetime. - public DateTimeOffset? LastTrainedDateTime { get; } + public DateTimeOffset? LastTrainedOn { get; } /// Represents the project last deployed datetime. - public DateTimeOffset? LastDeployedDateTime { get; } + public DateTimeOffset? LastDeployedOn { get; } /// Represents the project kind. - public ProjectKind ProjectKind { get; } + public AnalyzeConversationAuthoringProjectKind ProjectKind { get; } /// The project settings. public ProjectSettings Settings { get; } /// The storage container name in case of conversation summarization. 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 index 6e7eaa0108c9..15f2ff225f15 100644 --- 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 @@ -42,11 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("modelId"u8); writer.WriteStringValue(ModelId); writer.WritePropertyName("lastTrainedDateTime"u8); - writer.WriteStringValue(LastTrainedDateTime, "O"); + writer.WriteStringValue(LastTrainedOn, "O"); writer.WritePropertyName("lastTrainingDurationInSeconds"u8); writer.WriteNumberValue(LastTrainingDurationInSeconds); writer.WritePropertyName("modelExpirationDate"u8); - writer.WriteStringValue(ModelExpirationDate, "D"); + writer.WriteStringValue(ModelExpiredOn, "D"); writer.WritePropertyName("modelTrainingConfigVersion"u8); writer.WriteStringValue(ModelTrainingConfigVersion); writer.WritePropertyName("hasSnapshot"u8); 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 index 1fbc9b616db0..2b699955b47b 100644 --- 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 @@ -47,21 +47,21 @@ public partial class ProjectTrainedModel /// Initializes a new instance of . /// The model ID. - /// The last trained date time of the model. + /// 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 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) + internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedOn, int lastTrainingDurationInSeconds, DateTimeOffset modelExpiredOn, string modelTrainingConfigVersion, bool hasSnapshot) { Argument.AssertNotNull(modelId, nameof(modelId)); Argument.AssertNotNull(modelTrainingConfigVersion, nameof(modelTrainingConfigVersion)); ModelId = modelId; - LastTrainedDateTime = lastTrainedDateTime; + LastTrainedOn = lastTrainedOn; LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; - ModelExpirationDate = modelExpirationDate; + ModelExpiredOn = modelExpiredOn; ModelTrainingConfigVersion = modelTrainingConfigVersion; HasSnapshot = hasSnapshot; } @@ -69,19 +69,19 @@ internal ProjectTrainedModel(string modelId, DateTimeOffset lastTrainedDateTime, /// Initializes a new instance of . /// The trained model label. /// The model ID. - /// The last trained date time of the model. + /// 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 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) + internal ProjectTrainedModel(string label, string modelId, DateTimeOffset lastTrainedOn, int lastTrainingDurationInSeconds, DateTimeOffset modelExpiredOn, string modelTrainingConfigVersion, bool hasSnapshot, IDictionary serializedAdditionalRawData) { Label = label; ModelId = modelId; - LastTrainedDateTime = lastTrainedDateTime; + LastTrainedOn = lastTrainedOn; LastTrainingDurationInSeconds = lastTrainingDurationInSeconds; - ModelExpirationDate = modelExpirationDate; + ModelExpiredOn = modelExpiredOn; ModelTrainingConfigVersion = modelTrainingConfigVersion; HasSnapshot = hasSnapshot; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -97,11 +97,11 @@ internal ProjectTrainedModel() /// The model ID. public string ModelId { get; } /// The last trained date time of the model. - public DateTimeOffset LastTrainedDateTime { get; } + public DateTimeOffset LastTrainedOn { get; } /// The duration of the model's last training request in seconds. public int LastTrainingDurationInSeconds { get; } /// The model expiration date. - public DateTimeOffset ModelExpirationDate { get; } + public DateTimeOffset ModelExpiredOn { get; } /// The model training config version. public string ModelTrainingConfigVersion { get; } /// The flag to indicate if the trained model has a snapshot ready. 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 index ad609f62ed3a..6a316b260c5a 100644 --- 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 @@ -23,9 +23,15 @@ public StringIndexType(string value) } private const string Utf16CodeUnitValue = "Utf16CodeUnit"; + private const string Utf8CodeUnitValue = "Utf8CodeUnit"; + private const string Utf32CodeUnitValue = "Utf32CodeUnit"; /// 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); + /// Utf8CodeUnit. + public static StringIndexType Utf8CodeUnit { get; } = new StringIndexType(Utf8CodeUnitValue); + /// Utf32CodeUnit. + public static StringIndexType Utf32CodeUnit { get; } = new StringIndexType(Utf32CodeUnitValue); /// 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. 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/SubTrainingOperationState.Serialization.cs similarity index 68% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingOperationState.Serialization.cs index 34b55b9c7674..00b3477e56a2 100644 --- 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/SubTrainingOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class SubTrainingJobState : IUtf8JsonSerializable, IJsonModel + public partial class SubTrainingOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,23 +28,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// 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; + 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."); + throw new FormatException($"The model {nameof(SubTrainingOperationState)} does not support writing '{format}' format."); } writer.WritePropertyName("percentComplete"u8); writer.WriteNumberValue(PercentComplete); - if (Optional.IsDefined(StartDateTime)) + if (Optional.IsDefined(StartedOn)) { writer.WritePropertyName("startDateTime"u8); - writer.WriteStringValue(StartDateTime.Value, "O"); + writer.WriteStringValue(StartedOn.Value, "O"); } - if (Optional.IsDefined(EndDateTime)) + if (Optional.IsDefined(EndedOn)) { writer.WritePropertyName("endDateTime"u8); - writer.WriteStringValue(EndDateTime.Value, "O"); + writer.WriteStringValue(EndedOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -65,19 +65,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SubTrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SubTrainingOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SubTrainingOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSubTrainingJobState(document.RootElement, options); + return DeserializeSubTrainingOperationState(document.RootElement, options); } - internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static SubTrainingOperationState DeserializeSubTrainingOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -88,7 +88,7 @@ internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement e int percentComplete = default; DateTimeOffset? startDateTime = default; DateTimeOffset? endDateTime = default; - JobStatus status = default; + ConversationAuthoringOperationStatus status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -118,7 +118,7 @@ internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement e } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (options.Format != "W") @@ -127,46 +127,46 @@ internal static SubTrainingJobState DeserializeSubTrainingJobState(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new SubTrainingJobState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); + return new SubTrainingOperationState(percentComplete, startDateTime, endDateTime, status, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SubTrainingOperationState)} does not support writing '{options.Format}' format."); } } - SubTrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SubTrainingOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeSubTrainingOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SubTrainingJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SubTrainingOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static SubTrainingOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeSubTrainingJobState(document.RootElement); + return DeserializeSubTrainingOperationState(document.RootElement); } /// Convert into a . 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/SubTrainingOperationState.cs similarity index 76% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingOperationState.cs index bf95c7414ab8..764b488a54dc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SubTrainingOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the detailed state of a training sub-operation. - public partial class SubTrainingJobState + public partial class SubTrainingOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,42 +45,42 @@ public partial class SubTrainingJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Represents progress percentage. /// Represents the status of the sub-operation. - internal SubTrainingJobState(int percentComplete, JobStatus status) + internal SubTrainingOperationState(int percentComplete, ConversationAuthoringOperationStatus status) { PercentComplete = percentComplete; Status = status; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Represents progress percentage. - /// Represents the start date time. - /// Represents the end date time. + /// 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) + internal SubTrainingOperationState(int percentComplete, DateTimeOffset? startedOn, DateTimeOffset? endedOn, ConversationAuthoringOperationStatus status, IDictionary serializedAdditionalRawData) { PercentComplete = percentComplete; - StartDateTime = startDateTime; - EndDateTime = endDateTime; + StartedOn = startedOn; + EndedOn = endedOn; Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SubTrainingJobState() + /// Initializes a new instance of for deserialization. + internal SubTrainingOperationState() { } /// Represents progress percentage. public int PercentComplete { get; } /// Represents the start date time. - public DateTimeOffset? StartDateTime { get; } + public DateTimeOffset? StartedOn { get; } /// Represents the end date time. - public DateTimeOffset? EndDateTime { get; } + public DateTimeOffset? EndedOn { get; } /// Represents the status of the sub-operation. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus 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 index b57d25aa07b2..c1aafb486d63 100644 --- 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 @@ -34,8 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SupportedLanguage)} does not support writing '{format}' format."); } - writer.WritePropertyName("languageName"u8); - writer.WriteStringValue(LanguageName); + if (options.Format != "W") + { + writer.WritePropertyName("languageName"u8); + writer.WriteStringValue(LanguageName); + } writer.WritePropertyName("languageCode"u8); writer.WriteStringValue(LanguageCode); if (options.Format != "W" && _serializedAdditionalRawData != null) 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 index cc3293a6b09c..3daa571a76c2 100644 --- 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 @@ -46,15 +46,12 @@ public partial class SupportedLanguage 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) + /// is null. + internal SupportedLanguage(string languageCode) { - Argument.AssertNotNull(languageName, nameof(languageName)); Argument.AssertNotNull(languageCode, nameof(languageCode)); - LanguageName = languageName; LanguageCode = languageCode; } 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 deleted file mode 100644 index 10dfb02e3505..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// 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 deleted file mode 100644 index 573a75efe97f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SupportedLanguages.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using 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/SwapDeploymentsJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsOperationState.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsOperationState.Serialization.cs index 11247b186dd9..c0a7793de9fc 100644 --- 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/SwapDeploymentsOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class SwapDeploymentsJobState : IUtf8JsonSerializable, IJsonModel + public partial class SwapDeploymentsOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// 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; + 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."); + throw new FormatException($"The model {nameof(SwapDeploymentsOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -87,19 +87,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SwapDeploymentsJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SwapDeploymentsOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SwapDeploymentsOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSwapDeploymentsJobState(document.RootElement, options); + return DeserializeSwapDeploymentsOperationState(document.RootElement, options); } - internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static SwapDeploymentsOperationState DeserializeSwapDeploymentsOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -111,9 +111,9 @@ internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonE DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -144,7 +144,7 @@ internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonE } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -153,10 +153,10 @@ internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -167,10 +167,10 @@ internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -181,54 +181,54 @@ internal static SwapDeploymentsJobState DeserializeSwapDeploymentsJobState(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new SwapDeploymentsJobState( + return new SwapDeploymentsOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SwapDeploymentsOperationState)} does not support writing '{options.Format}' format."); } } - SwapDeploymentsJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SwapDeploymentsOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeSwapDeploymentsOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SwapDeploymentsJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SwapDeploymentsOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static SwapDeploymentsOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeSwapDeploymentsJobState(document.RootElement); + return DeserializeSwapDeploymentsOperationState(document.RootElement); } /// Convert into a . 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/SwapDeploymentsOperationState.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsOperationState.cs index 23f81396d899..3e471669b25b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/SwapDeploymentsOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a deployment job. - public partial class SwapDeploymentsJobState + public partial class SwapDeploymentsOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,58 +45,58 @@ public partial class SwapDeploymentsJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal SwapDeploymentsOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status) { - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// 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 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) + internal SwapDeploymentsOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SwapDeploymentsJobState() + /// Initializes a new instance of for deserialization. + internal SwapDeploymentsOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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 index 7811d7667b24..1c3dc6bb2c41 100644 --- 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 @@ -34,8 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrainingConfigVersion)} does not support writing '{format}' format."); } - writer.WritePropertyName("trainingConfigVersion"u8); - writer.WriteStringValue(TrainingConfigVersionProperty); + 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) 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 index 17e1509a0e00..2168f9f12b8d 100644 --- 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 @@ -46,14 +46,9 @@ public partial class TrainingConfigVersion 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) + internal TrainingConfigVersion(DateTimeOffset modelExpirationDate) { - Argument.AssertNotNull(trainingConfigVersionProperty, nameof(trainingConfigVersionProperty)); - - TrainingConfigVersionProperty = trainingConfigVersionProperty; ModelExpirationDate = modelExpirationDate; } 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 deleted file mode 100644 index b2ca76809d13..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.Serialization.cs +++ /dev/null @@ -1,163 +0,0 @@ -// 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 deleted file mode 100644 index e9843b7eec26..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingConfigVersions.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using 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 index 523f1676b7c8..b440930ad6a8 100644 --- 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 @@ -87,7 +87,7 @@ internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement ele } string modelLabel = default; string trainingConfigVersion = default; - TrainingMode trainingMode = default; + AnalyzeConversationAuthoringTrainingMode trainingMode = default; EvaluationDetails evaluationOptions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -105,7 +105,7 @@ internal static TrainingJobDetails DeserializeTrainingJobDetails(JsonElement ele } if (property.NameEquals("trainingMode"u8)) { - trainingMode = new TrainingMode(property.Value.GetString()); + trainingMode = new AnalyzeConversationAuthoringTrainingMode(property.Value.GetString()); continue; } if (property.NameEquals("evaluationOptions"u8)) 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 index 3feb12923271..3bc0d14e88a6 100644 --- 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 @@ -49,7 +49,7 @@ public partial class TrainingJobDetails /// Represents the output model label. /// Represents the mode of the training operation. /// is null. - public TrainingJobDetails(string modelLabel, TrainingMode trainingMode) + public TrainingJobDetails(string modelLabel, AnalyzeConversationAuthoringTrainingMode trainingMode) { Argument.AssertNotNull(modelLabel, nameof(modelLabel)); @@ -63,7 +63,7 @@ public TrainingJobDetails(string modelLabel, TrainingMode trainingMode) /// 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) + internal TrainingJobDetails(string modelLabel, string trainingConfigVersion, AnalyzeConversationAuthoringTrainingMode trainingMode, EvaluationDetails evaluationOptions, IDictionary serializedAdditionalRawData) { ModelLabel = modelLabel; TrainingConfigVersion = trainingConfigVersion; @@ -82,7 +82,7 @@ internal TrainingJobDetails() /// 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; } + public AnalyzeConversationAuthoringTrainingMode 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 index 583091695fdd..095579c03cc9 100644 --- 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 @@ -50,10 +50,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("evaluationStatus"u8); writer.WriteObjectValue(EvaluationStatus, options); } - if (Optional.IsDefined(EstimatedEndDateTime)) + if (Optional.IsDefined(EstimatedEndOn)) { writer.WritePropertyName("estimatedEndDateTime"u8); - writer.WriteStringValue(EstimatedEndDateTime.Value, "O"); + writer.WriteStringValue(EstimatedEndOn.Value, "O"); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -94,9 +94,9 @@ internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement eleme } string modelLabel = default; string trainingConfigVersion = default; - TrainingMode? trainingMode = default; - SubTrainingJobState trainingStatus = default; - SubTrainingJobState evaluationStatus = default; + AnalyzeConversationAuthoringTrainingMode? trainingMode = default; + SubTrainingOperationState trainingStatus = default; + SubTrainingOperationState evaluationStatus = default; DateTimeOffset? estimatedEndDateTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -118,12 +118,12 @@ internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement eleme { continue; } - trainingMode = new TrainingMode(property.Value.GetString()); + trainingMode = new AnalyzeConversationAuthoringTrainingMode(property.Value.GetString()); continue; } if (property.NameEquals("trainingStatus"u8)) { - trainingStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + trainingStatus = SubTrainingOperationState.DeserializeSubTrainingOperationState(property.Value, options); continue; } if (property.NameEquals("evaluationStatus"u8)) @@ -132,7 +132,7 @@ internal static TrainingJobResult DeserializeTrainingJobResult(JsonElement eleme { continue; } - evaluationStatus = SubTrainingJobState.DeserializeSubTrainingJobState(property.Value, options); + evaluationStatus = SubTrainingOperationState.DeserializeSubTrainingOperationState(property.Value, options); continue; } if (property.NameEquals("estimatedEndDateTime"u8)) 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 index 720a34cb1f3a..febdbc8c42c8 100644 --- 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 @@ -50,7 +50,7 @@ public partial class TrainingJobResult /// Represents training config version. /// Represents the model training status. /// , or is null. - internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingJobState trainingStatus) + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubTrainingOperationState trainingStatus) { Argument.AssertNotNull(modelLabel, nameof(modelLabel)); Argument.AssertNotNull(trainingConfigVersion, nameof(trainingConfigVersion)); @@ -67,16 +67,16 @@ internal TrainingJobResult(string modelLabel, string trainingConfigVersion, SubT /// 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. + /// 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) + internal TrainingJobResult(string modelLabel, string trainingConfigVersion, AnalyzeConversationAuthoringTrainingMode? trainingMode, SubTrainingOperationState trainingStatus, SubTrainingOperationState evaluationStatus, DateTimeOffset? estimatedEndOn, IDictionary serializedAdditionalRawData) { ModelLabel = modelLabel; TrainingConfigVersion = trainingConfigVersion; TrainingMode = trainingMode; TrainingStatus = trainingStatus; EvaluationStatus = evaluationStatus; - EstimatedEndDateTime = estimatedEndDateTime; + EstimatedEndOn = estimatedEndOn; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,12 +90,12 @@ internal TrainingJobResult() /// Represents training config version. public string TrainingConfigVersion { get; } /// Represents the mode of the training operation. - public TrainingMode? TrainingMode { get; } + public AnalyzeConversationAuthoringTrainingMode? TrainingMode { get; } /// Represents the model training status. - public SubTrainingJobState TrainingStatus { get; } + public SubTrainingOperationState TrainingStatus { get; } /// Represents model evaluation status. - public SubTrainingJobState EvaluationStatus { get; } + public SubTrainingOperationState EvaluationStatus { get; } /// Represents the estimated end date time for training and evaluation. - public DateTimeOffset? EstimatedEndDateTime { get; } + public DateTimeOffset? EstimatedEndOn { 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 deleted file mode 100644 index 8b3ba74604b3..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// 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/TrainingJobState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingOperationState.Serialization.cs similarity index 71% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingOperationState.Serialization.cs index 00058b957bf1..abeb248722bf 100644 --- 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/TrainingOperationState.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - public partial class TrainingJobState : IUtf8JsonSerializable, IJsonModel + public partial class TrainingOperationState : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// 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; + 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."); + throw new FormatException($"The model {nameof(TrainingOperationState)} does not support writing '{format}' format."); } if (options.Format != "W") @@ -40,13 +40,13 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(JobId); } writer.WritePropertyName("createdDateTime"u8); - writer.WriteStringValue(CreatedDateTime, "O"); + writer.WriteStringValue(CreatedOn, "O"); writer.WritePropertyName("lastUpdatedDateTime"u8); - writer.WriteStringValue(LastUpdatedDateTime, "O"); - if (Optional.IsDefined(ExpirationDateTime)) + writer.WriteStringValue(LastUpdatedOn, "O"); + if (Optional.IsDefined(ExpiresOn)) { writer.WritePropertyName("expirationDateTime"u8); - writer.WriteStringValue(ExpirationDateTime.Value, "O"); + writer.WriteStringValue(ExpiresOn.Value, "O"); } writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Warnings) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -66,7 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in Errors) { - writer.WriteObjectValue(item, options); + JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); } @@ -89,19 +89,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - TrainingJobState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TrainingOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(TrainingOperationState)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTrainingJobState(document.RootElement, options); + return DeserializeTrainingOperationState(document.RootElement, options); } - internal static TrainingJobState DeserializeTrainingJobState(JsonElement element, ModelReaderWriterOptions options = null) + internal static TrainingOperationState DeserializeTrainingOperationState(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -113,9 +113,9 @@ internal static TrainingJobState DeserializeTrainingJobState(JsonElement element DateTimeOffset createdDateTime = default; DateTimeOffset lastUpdatedDateTime = default; DateTimeOffset? expirationDateTime = default; - JobStatus status = default; - IReadOnlyList warnings = default; - IReadOnlyList errors = default; + ConversationAuthoringOperationStatus status = default; + IReadOnlyList warnings = default; + IReadOnlyList errors = default; TrainingJobResult result = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -147,7 +147,7 @@ internal static TrainingJobState DeserializeTrainingJobState(JsonElement element } if (property.NameEquals("status"u8)) { - status = new JobStatus(property.Value.GetString()); + status = new ConversationAuthoringOperationStatus(property.Value.GetString()); continue; } if (property.NameEquals("warnings"u8)) @@ -156,10 +156,10 @@ internal static TrainingJobState DeserializeTrainingJobState(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsWarning.DeserializeAuthoringConversationsWarning(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } warnings = array; continue; @@ -170,10 +170,10 @@ internal static TrainingJobState DeserializeTrainingJobState(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AuthoringConversationsError.DeserializeAuthoringConversationsError(item, options)); + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } errors = array; continue; @@ -189,55 +189,55 @@ internal static TrainingJobState DeserializeTrainingJobState(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new TrainingJobState( + return new TrainingOperationState( jobId, createdDateTime, lastUpdatedDateTime, expirationDateTime, status, - warnings ?? new ChangeTrackingList(), - errors ?? new ChangeTrackingList(), + warnings ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), result, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(TrainingOperationState)} does not support writing '{options.Format}' format."); } } - TrainingJobState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + TrainingOperationState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeTrainingOperationState(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(TrainingJobState)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrainingOperationState)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static TrainingOperationState FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeTrainingJobState(document.RootElement); + return DeserializeTrainingOperationState(document.RootElement); } /// Convert into a . 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/TrainingOperationState.cs similarity index 65% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingOperationState.cs index 882cd133cc27..ac1ead90c2f1 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingJobState.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/TrainingOperationState.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { /// Represents the state of a training job. - public partial class TrainingJobState + public partial class TrainingOperationState { /// /// Keeps track of any properties unknown to the library. @@ -45,40 +45,40 @@ public partial class TrainingJobState /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The creation date time of the job. - /// The last date time the job was updated. + /// 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) + internal TrainingOperationState(DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, ConversationAuthoringOperationStatus status, TrainingJobResult result) { Argument.AssertNotNull(result, nameof(result)); - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; Status = status; - Warnings = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Warnings = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); Result = result; } - /// Initializes a new instance of . + /// 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 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) + internal TrainingOperationState(string jobId, DateTimeOffset createdOn, DateTimeOffset lastUpdatedOn, DateTimeOffset? expiresOn, ConversationAuthoringOperationStatus status, IReadOnlyList warnings, IReadOnlyList errors, TrainingJobResult result, IDictionary serializedAdditionalRawData) { JobId = jobId; - CreatedDateTime = createdDateTime; - LastUpdatedDateTime = lastUpdatedDateTime; - ExpirationDateTime = expirationDateTime; + CreatedOn = createdOn; + LastUpdatedOn = lastUpdatedOn; + ExpiresOn = expiresOn; Status = status; Warnings = warnings; Errors = errors; @@ -86,25 +86,25 @@ internal TrainingJobState(string jobId, DateTimeOffset createdDateTime, DateTime _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal TrainingJobState() + /// Initializes a new instance of for deserialization. + internal TrainingOperationState() { } /// The job ID. public string JobId { get; } /// The creation date time of the job. - public DateTimeOffset CreatedDateTime { get; } + public DateTimeOffset CreatedOn { get; } /// The last date time the job was updated. - public DateTimeOffset LastUpdatedDateTime { get; } + public DateTimeOffset LastUpdatedOn { get; } /// The expiration date time of the job. - public DateTimeOffset? ExpirationDateTime { get; } + public DateTimeOffset? ExpiresOn { get; } /// The job status. - public JobStatus Status { get; } + public ConversationAuthoringOperationStatus Status { get; } /// The warnings that were encountered while executing the job. - public IReadOnlyList Warnings { get; } + public IReadOnlyList Warnings { get; } /// The errors encountered while executing the job. - public IReadOnlyList Errors { get; } + 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/UnknownExportedProjectAssets.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAsset.Serialization.cs similarity index 60% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAsset.Serialization.cs index 90fd010370fe..0a248517d34a 100644 --- 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/UnknownExportedProjectAsset.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - internal partial class UnknownExportedProjectAssets : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownExportedProjectAsset : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,28 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); } - ExportedProjectAssets IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ExportedProjectAsset IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeExportedProjectAssets(document.RootElement, options); + return DeserializeExportedProjectAsset(document.RootElement, options); } - internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAssets(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownExportedProjectAsset DeserializeUnknownExportedProjectAsset(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -57,14 +57,14 @@ internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAs { return null; } - ProjectKind projectKind = "Unknown"; + AnalyzeConversationAuthoringProjectKind 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()); + projectKind = new AnalyzeConversationAuthoringProjectKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -73,53 +73,53 @@ internal static UnknownExportedProjectAssets DeserializeUnknownExportedProjectAs } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownExportedProjectAssets(projectKind, serializedAdditionalRawData); + return new UnknownExportedProjectAsset(projectKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support writing '{options.Format}' format."); } } - ExportedProjectAssets IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ExportedProjectAsset IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeExportedProjectAsset(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ExportedProjectAssets)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ExportedProjectAsset)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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) + internal static new UnknownExportedProjectAsset FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownExportedProjectAssets(document.RootElement); + return DeserializeUnknownExportedProjectAsset(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + 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/UnknownExportedProjectAsset.cs similarity index 55% rename from sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAsset.cs index 8a716c535450..dbdd9670db52 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAssets.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/src/Generated/Models/UnknownExportedProjectAsset.cs @@ -10,18 +10,18 @@ namespace Azure.AI.Language.Conversations.Authoring.Models { - /// Unknown version of ExportedProjectAssets. - internal partial class UnknownExportedProjectAssets : ExportedProjectAssets + /// Unknown version of ExportedProjectAsset. + internal partial class UnknownExportedProjectAsset : ExportedProjectAsset { - /// Initializes a new instance of . + /// 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) + internal UnknownExportedProjectAsset(AnalyzeConversationAuthoringProjectKind projectKind, IDictionary serializedAdditionalRawData) : base(projectKind, serializedAdditionalRawData) { } - /// Initializes a new instance of for deserialization. - internal UnknownExportedProjectAssets() + /// Initializes a new instance of for deserialization. + internal UnknownExportedProjectAsset() { } } 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 deleted file mode 100644 index bc4759b14658..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AnalyzeConversationAuthoring.cs +++ /dev/null @@ -1,6466 +0,0 @@ -// 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/tests/Generated/Samples/Samples_AuthoringClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AuthoringClient.cs new file mode 100644 index 000000000000..28d60af5056c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_AuthoringClient.cs @@ -0,0 +1,1349 @@ +// 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.Identity; +using NUnit.Framework; + +namespace Azure.AI.Language.Conversations.Authoring.Samples +{ + public partial class Samples_AuthoringClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (ProjectDeployment item in client.GetDeploymentsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProjects_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (ProjectMetadata item in client.GetProjectsAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedLanguages("Conversation")) + { + 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_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation")) + { + 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_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (SupportedLanguage item in client.GetSupportedLanguages(AnalyzeConversationAuthoringProjectKind.Conversation)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(AnalyzeConversationAuthoringProjectKind.Conversation)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedLanguages("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + 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_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedLanguagesAsync("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + 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_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (SupportedLanguage item in client.GetSupportedLanguages(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSupportedLanguage_GetSupportedLanguages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (SupportedLanguage item in client.GetSupportedLanguagesAsync(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeployments(maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringAssignedProjectDeploymentsMetadata_GetAssignedResourceDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (AssignedProjectDeploymentsMetadata item in client.GetAssignedResourceDeploymentsAsync(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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (AssignedDeploymentResource item in client.GetDeploymentResourcesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(null, null, null, null, null, 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_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(null, null, null, null, null, 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_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedPrebuiltEntities(1234, 1234, 1234, "", "", 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_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedPrebuiltEntitiesAsync(1234, 1234, 1234, "", "", 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_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntities(maxCount: 1234, skip: 1234, maxpagesize: 1234, language: "", multilingual: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringPrebuiltEntity_GetSupportedPrebuiltEntities_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (PrebuiltEntity item in client.GetSupportedPrebuiltEntitiesAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234, language: "", multilingual: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation")) + { + 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_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation")) + { + 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_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(AnalyzeConversationAuthoringProjectKind.Conversation)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(AnalyzeConversationAuthoringProjectKind.Conversation)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (BinaryData item in client.GetTrainingConfigVersions("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + 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_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (BinaryData item in client.GetTrainingConfigVersionsAsync("Conversation", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + 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_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (TrainingConfigVersion item in client.GetTrainingConfigVersions(AnalyzeConversationAuthoringProjectKind.Conversation, maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringTrainingConfigVersion_GetTrainingConfigVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (TrainingConfigVersion item in client.GetTrainingConfigVersionsAsync(AnalyzeConversationAuthoringProjectKind.Conversation, 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (TrainingOperationState 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (TrainingOperationState 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + foreach (TrainingOperationState 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (TrainingOperationState item in client.GetTrainingJobsAsync("", 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (ProjectTrainedModel item in client.GetTrainedModelsAsync("", 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + 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(""); + AuthoringClient client = new AuthoringClient(endpoint, credential); + + await foreach (ExportedTrainedModel item in client.GetExportedModelsAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234)) + { + } + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringDeployments.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringDeployments.cs new file mode 100644 index 000000000000..2a151377e6d2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringDeployments.cs @@ -0,0 +1,1542 @@ +// 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_ConversationAuthoringDeployments + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectDeployment_GetDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentDeleteFromResourcesJobState_GetDeploymentDeleteFromResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentJobState_GetDeploymentStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringSwapDeploymentsJobState_GetSwapDeploymentsStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = await client.GetSwapDeploymentsStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringDeploymentResourcesJobState_GetAssignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = await client.GetAssignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = client.GetUnassignDeploymentResourcesStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_GetUnassignDeploymentResourcesStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Response response = await client.GetUnassignDeploymentResourcesStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_SwapDeployments_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_SwapDeployments_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_SwapDeployments_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_SwapDeployments_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_SwapDeployments_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_SwapDeployments_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_SwapDeployments_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); + Operation operation = client.SwapDeployments(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_SwapDeployments_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + SwapDeploymentsDetails details = new SwapDeploymentsDetails("", ""); + Operation operation = await client.SwapDeploymentsAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeployProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeployProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeployProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + CreateDeploymentDetails details = new CreateDeploymentDetails(""); + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeployProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + CreateDeploymentDetails details = new CreateDeploymentDetails(""); + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeployProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeployProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeployProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + CreateDeploymentDetails details = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeployProject(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeployProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + CreateDeploymentDetails details = new CreateDeploymentDetails("") + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeployProjectAsync(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeleteDeployment_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeleteDeployment_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeleteDeployment_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Operation operation = client.DeleteDeployment(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeleteDeployment_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + Operation operation = await client.DeleteDeploymentAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeleteDeploymentFromResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeleteDeploymentFromResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeleteDeploymentFromResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + DeleteDeploymentDetails details = new DeleteDeploymentDetails(); + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeleteDeploymentFromResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + DeleteDeploymentDetails details = new DeleteDeploymentDetails(); + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_DeleteDeploymentFromResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeleteDeploymentFromResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_DeleteDeploymentFromResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + DeleteDeploymentDetails details = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = client.DeleteDeploymentFromResources(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_DeleteDeploymentFromResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + DeleteDeploymentDetails details = new DeleteDeploymentDetails + { + AssignedResourceIds = { "" }, + }; + Operation operation = await client.DeleteDeploymentFromResourcesAsync(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_AssignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_AssignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_AssignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_AssignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_AssignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_AssignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_AssignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = client.AssignDeploymentResources(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_AssignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + AssignDeploymentResourcesDetails details = new AssignDeploymentResourcesDetails(new ResourceMetadata[] + { +new ResourceMetadata("", "", "") + }); + Operation operation = await client.AssignDeploymentResourcesAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_UnassignDeploymentResources_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_UnassignDeploymentResources_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_UnassignDeploymentResources_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_UnassignDeploymentResources_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringDeployments_UnassignDeploymentResources_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_UnassignDeploymentResources_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + 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_ConversationAuthoringDeployments_UnassignDeploymentResources_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = client.UnassignDeploymentResources(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringDeployments_UnassignDeploymentResources_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringDeployments client = new AuthoringClient(endpoint, credential).GetConversationAuthoringDeploymentsClient(); + + UnassignDeploymentResourcesDetails details = new UnassignDeploymentResourcesDetails(new string[] { "" }); + Operation operation = await client.UnassignDeploymentResourcesAsync(WaitUntil.Completed, "", details); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringModels.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringModels.cs new file mode 100644 index 000000000000..c1df1e06f53e --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringModels.cs @@ -0,0 +1,1484 @@ +// 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_ConversationAuthoringModels + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectTrainedModel_GetTrainedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetEvaluationStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_GetModelEvaluationSummary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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_ConversationAuthoringModels_GetModelEvaluationSummary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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_ConversationAuthoringModels_GetModelEvaluationSummary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_GetModelEvaluationSummary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetModelEvaluationSummaryAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_GetModelEvaluationSummary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = client.GetModelEvaluationSummary("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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_ConversationAuthoringModels_GetModelEvaluationSummary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetModelEvaluationSummaryAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("entitiesEvaluation").GetProperty("confusionMatrix").GetProperty("").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").GetProperty("").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_ConversationAuthoringModels_GetModelEvaluationSummary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = client.GetModelEvaluationSummary("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_GetModelEvaluationSummary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringLoadSnapshotJobState_GetLoadSnapshotStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetLoadSnapshotStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedTrainedModel_GetExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportedModelJobState_GetExportedModelJobStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Response response = await client.GetExportedModelJobStatusAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringUtteranceEvaluationResult_GetModelEvaluationResults_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_EvaluateModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_EvaluateModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_EvaluateModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + EvaluationDetails details = new EvaluationDetails(); + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", details); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_EvaluateModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + EvaluationDetails details = new EvaluationDetails(); + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", details); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_EvaluateModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_EvaluateModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_EvaluateModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + EvaluationDetails details = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = client.EvaluateModel(WaitUntil.Completed, "", "", details); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_EvaluateModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + EvaluationDetails details = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }; + Operation operation = await client.EvaluateModelAsync(WaitUntil.Completed, "", "", details); + EvaluationJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_LoadSnapshot_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_LoadSnapshot_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_LoadSnapshot_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = client.LoadSnapshot(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_LoadSnapshot_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = await client.LoadSnapshotAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_DeleteExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_DeleteExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_DeleteExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = client.DeleteExportedModel(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_DeleteExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + Operation operation = await client.DeleteExportedModelAsync(WaitUntil.Completed, "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_CreateOrUpdateExportedModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_CreateOrUpdateExportedModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_CreateOrUpdateExportedModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + ExportedModelDetails details = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_CreateOrUpdateExportedModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + ExportedModelDetails details = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringModels_CreateOrUpdateExportedModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_CreateOrUpdateExportedModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + 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_ConversationAuthoringModels_CreateOrUpdateExportedModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + ExportedModelDetails details = new ExportedModelDetails(""); + Operation operation = client.CreateOrUpdateExportedModel(WaitUntil.Completed, "", "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringModels_CreateOrUpdateExportedModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringModels client = new AuthoringClient(endpoint, credential).GetConversationAuthoringModelsClient(); + + ExportedModelDetails details = new ExportedModelDetails(""); + Operation operation = await client.CreateOrUpdateExportedModelAsync(WaitUntil.Completed, "", "", details); + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringProjects.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringProjects.cs new file mode 100644 index 000000000000..a727d132fe6d --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tests/Generated/Samples/Samples_ConversationAuthoringProjects.cs @@ -0,0 +1,2190 @@ +// 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_ConversationAuthoringProjects + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringProjectMetadata_GetProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_GetProjectDeletionStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_GetProjectDeletionStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_GetProjectDeletionStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_GetProjectDeletionStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_GetProjectDeletionStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_GetProjectDeletionStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_GetProjectDeletionStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.GetProjectDeletionStatus(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_GetProjectDeletionStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetProjectDeletionStatusAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringExportProjectJobState_GetExportStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringImportProjectJobState_GetImportStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetImportStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_AuthorizeProjectCopy_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = client.AuthorizeProjectCopy("", 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_ConversationAuthoringProjects_AuthorizeProjectCopy_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + }); + Response response = await client.AuthorizeProjectCopyAsync("", 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_ConversationAuthoringProjects_AuthorizeProjectCopy_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.AuthorizeProjectCopy("", AnalyzeConversationAuthoringProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_AuthorizeProjectCopy_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.AuthorizeProjectCopyAsync("", AnalyzeConversationAuthoringProjectKind.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_AuthorizeProjectCopy_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = client.AuthorizeProjectCopy("", 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_ConversationAuthoringProjects_AuthorizeProjectCopy_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + using RequestContent content = RequestContent.Create(new + { + projectKind = "Conversation", + storageInputContainerName = "", + allowOverwrite = true, + }); + Response response = await client.AuthorizeProjectCopyAsync("", 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_ConversationAuthoringProjects_AuthorizeProjectCopy_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.AuthorizeProjectCopy("", AnalyzeConversationAuthoringProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_AuthorizeProjectCopy_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.AuthorizeProjectCopyAsync("", AnalyzeConversationAuthoringProjectKind.Conversation, storageInputContainerName: "", allowOverwrite: true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = client.GetCopyProjectStatus("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationAuthoringCopiedProjectJobState_GetCopyProjectStatus_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetCopyProjectStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationAuthoringTrainingJobState_GetTrainingStatus_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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("warnings")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("warnings")[0].GetProperty("innererror").GetProperty("code").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("innererror").GetProperty("code").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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Response response = await client.GetTrainingStatusAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_DeleteProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_DeleteProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_DeleteProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.DeleteProject(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_DeleteProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.DeleteProjectAsync(WaitUntil.Completed, ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Export_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Export_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Export_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Export_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Export_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.Export(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Export_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", "Utf16CodeUnit", exportedProjectFormat: "Conversation", assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Export_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.Export(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Export_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.ExportAsync(WaitUntil.Completed, "", StringIndexType.Utf16CodeUnit, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation, assetKind: "", trainedModelLabel: ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Import_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Import_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Import_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "")); + Operation operation = client.Import(WaitUntil.Completed, "", exportedProject); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Import_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "")); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", exportedProject); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Import_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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", +entities = 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 = "Train", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = client.Import(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Import_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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", +entities = 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 = "Train", +} + }, + projectKind = "Conversation", + }, + }); + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", content, exportedProjectFormat: "Conversation"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Import_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAsset + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionMode = AnalyzeConversationAuthoringCompositionMode.ReturnLongestOverlap, +Entities = 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 = DatasetType.Train, +}}, + }, + }; + Operation operation = client.Import(WaitUntil.Completed, "", exportedProject, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Import_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + ExportedProject exportedProject = new ExportedProject("", StringIndexType.Utf16CodeUnit, new CreateProjectDetails(AnalyzeConversationAuthoringProjectKind.Conversation, "", "") + { + Settings = new ProjectSettings(123.45F), + StorageInputContainerName = "", + Multilingual = true, + Description = "", + }) + { + Assets = new ConversationExportedProjectAsset + { + Intents = { new ConversationExportedIntent("") }, + Entities = {new ConversationExportedEntity("") +{ +CompositionMode = AnalyzeConversationAuthoringCompositionMode.ReturnLongestOverlap, +Entities = 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 = DatasetType.Train, +}}, + }, + }; + Operation operation = await client.ImportAsync(WaitUntil.Completed, "", exportedProject, exportedProjectFormat: AnalyzeConversationAuthoringExportedProjectFormat.Conversation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_CopyProject_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CopyProject_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CopyProject_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + CopyProjectDetails details = new CopyProjectDetails( + AnalyzeConversationAuthoringProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_CopyProject_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + CopyProjectDetails details = new CopyProjectDetails( + AnalyzeConversationAuthoringProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_CopyProject_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CopyProject_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CopyProject_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + CopyProjectDetails details = new CopyProjectDetails( + AnalyzeConversationAuthoringProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = client.CopyProject(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_CopyProject_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + CopyProjectDetails details = new CopyProjectDetails( + AnalyzeConversationAuthoringProjectKind.Conversation, + "", + "", + DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + "", + ""); + Operation operation = await client.CopyProjectAsync(WaitUntil.Completed, "", details); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Train_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Train_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Train_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced); + Operation operation = client.Train(WaitUntil.Completed, "", details); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Train_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced); + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", details); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_Train_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Train_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_Train_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = client.Train(WaitUntil.Completed, "", details); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_Train_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + TrainingJobDetails details = new TrainingJobDetails("", AnalyzeConversationAuthoringTrainingMode.Advanced) + { + TrainingConfigVersion = "", + EvaluationOptions = new EvaluationDetails + { + Kind = AnalyzeConversationAuthoringEvaluationKind.Percentage, + TrainingSplitPercentage = 1234, + TestingSplitPercentage = 1234, + }, + }; + Operation operation = await client.TrainAsync(WaitUntil.Completed, "", details); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_CancelTrainingJob_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CancelTrainingJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CancelTrainingJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_CancelTrainingJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ConversationAuthoringProjects_CancelTrainingJob_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CancelTrainingJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + 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_ConversationAuthoringProjects_CancelTrainingJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = client.CancelTrainingJob(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ConversationAuthoringProjects_CancelTrainingJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAuthoringProjects client = new AuthoringClient(endpoint, credential).GetConversationAuthoringProjectsClient(); + + Operation operation = await client.CancelTrainingJobAsync(WaitUntil.Completed, "", ""); + TrainingJobResult responseData = operation.Value; + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml index 66b85f8aaf90..2af4ae68eaf7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/cognitiveservices/Language.AnalyzeConversations-authoring -commit: 1bbb8f628f6e3083b73a2190e15bb0f5911571a3 +commit: 40ce25fed19f2dfbe4149d5e2dda6c66026a458c repo: Azure/azure-rest-api-specs - +additionalDirectories: