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 d619718162b9d..0000000000000
--- 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 9b8fcdf03b962..ee8a707800582 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,19 @@
#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 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 +27,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 +71,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 +89,6577 @@ 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")
+ /// 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.AssertNotNull(apiVersion, nameof(apiVersion));
+ Argument.AssertNotNullOrEmpty(projectName, nameof(projectName));
- return new AnalyzeConversationAuthoring(ClientDiagnostics, _pipeline, _keyCredential, _tokenCredential, _endpoint, apiVersion);
+ 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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(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("AuthoringClient.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("AuthoringClient.GetProjectDeletionStatus");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetProjectDeletionStatusRequest(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> 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.GetUnassignDeploymentResourcesStatus");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetUnassignDeploymentResourcesStatusRequest(projectName, 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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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("AuthoringClient.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, "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 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, "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 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);
+ }
+
+ /// 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, "AuthoringClient.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, "AuthoringClient.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, "AuthoringClient.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, "AuthoringClient.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, "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 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, "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 => TrainingJobState.DeserializeTrainingJobState(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 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);
+ }
+
+ // 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("AuthoringClient.DeleteProject");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteProjectRequest(projectName, context);
+ return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.DeleteProject");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteProjectRequest(projectName, context);
+ return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.CopyProject");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCopyProjectRequest(projectName, content, context);
+ return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.CopyProject");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCopyProjectRequest(projectName, content, context);
+ return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.Export");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context);
+ return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.Export");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateExportRequest(projectName, stringIndexType, exportedProjectFormat, assetKind, trainedModelLabel, context);
+ return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.Import");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context);
+ return await ProtocolOperationHelpers.ProcessMessageWithoutResponseValueAsync(_pipeline, message, ClientDiagnostics, "AuthoringClient.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("AuthoringClient.Import");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateImportRequest(projectName, content, exportedProjectFormat, context);
+ return ProtocolOperationHelpers.ProcessMessageWithoutResponseValue(_pipeline, message, ClientDiagnostics, "AuthoringClient.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, "AuthoringClient.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, "AuthoringClient.Train");
+ }
+
+ ///
+ /// [Protocol Method] Triggers a training job for a project.
+ ///
+ /// -
+ ///