diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index df67afa0183f..e9711d013921 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -263,6 +263,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;5.20.0;5.21.0-
com.azure.spring:spring-cloud-azure-stream-binder-servicebus;5.20.0;5.21.0-beta.1
com.azure.spring:spring-cloud-azure-testcontainers;5.20.0;5.21.0-beta.1
com.azure:azure-spring-data-cosmos;5.20.0;5.21.0-beta.1
+com.azure:azure-ai-language-text-authoring;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager;2.47.0;2.48.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.47.0;2.48.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appservice;2.47.0;2.48.0-beta.1
diff --git a/pom.xml b/pom.xml
index f5498ce9b286..b9c14d26a317 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,6 +40,7 @@
sdk/changeanalysis
sdk/chaos
sdk/clientcore
+ sdk/cognitivelanguage
sdk/cognitiveservices
sdk/commerce
sdk/communication
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/CHANGELOG.md b/sdk/cognitivelanguage/azure-ai-language-text-authoring/CHANGELOG.md
new file mode 100644
index 000000000000..6998ebcaabbe
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/CHANGELOG.md
@@ -0,0 +1,16 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+- Azure Authoring client library for Java. This package contains Microsoft Azure Authoring client library.
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+### Features Added
+
+- Initial release for the azure-ai-language-text-authoring Java SDK.
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/README.md b/sdk/cognitivelanguage/azure-ai-language-text-authoring/README.md
new file mode 100644
index 000000000000..0498b96fc6a1
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/README.md
@@ -0,0 +1,78 @@
+# Azure Authoring client library for Java
+
+Azure Authoring client library for Java.
+
+This package contains Microsoft Azure Authoring client library.
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+- [Product documentation][product_documentation]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure:azure-ai-language-text-authoring;current})
+```xml
+
+ com.azure
+ azure-ai-language-text-authoring
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Authentication
+
+[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.
+
+## Key concepts
+
+## Examples
+
+```java com.azure.ai.language.text.authoring.readme
+```
+
+### Service API versions
+
+The client library targets the latest service API version by default.
+The service client builder accepts an optional service API version parameter to specify which API version to communicate.
+
+#### Select a service API version
+
+You have the flexibility to explicitly select a supported service API version when initializing a service client via the service client builder.
+This ensures that the client can communicate with services using the specified API version.
+
+When selecting an API version, it is important to verify that there are no breaking changes compared to the latest API version.
+If there are significant differences, API calls may fail due to incompatibility.
+
+Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[product_documentation]: https://azure.microsoft.com/services/
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/assets.json b/sdk/cognitivelanguage/azure-ai-language-text-authoring/assets.json
new file mode 100644
index 000000000000..2dc184e49c55
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/assets.json
@@ -0,0 +1 @@
+{"AssetsRepo":"Azure/azure-sdk-assets","AssetsRepoPrefixPath":"java","TagPrefix":"java/cognitivelanguage/azure-ai-language-text-authoring","Tag":""}
\ No newline at end of file
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/pom.xml b/sdk/cognitivelanguage/azure-ai-language-text-authoring/pom.xml
new file mode 100644
index 000000000000..5acb378c5a2a
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/pom.xml
@@ -0,0 +1,72 @@
+
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure
+ azure-ai-language-text-authoring
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Authoring
+ This package contains Microsoft Azure Authoring client library.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ false
+
+
+
+ com.azure
+ azure-core
+ 1.55.1
+
+
+ com.azure
+ azure-core-http-netty
+ 1.15.9
+
+
+ com.azure
+ azure-core-test
+ 1.27.0-beta.6
+ test
+
+
+ com.azure
+ azure-identity
+ 1.15.2
+ test
+
+
+
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringAsyncClient.java b/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringAsyncClient.java
new file mode 100644
index 000000000000..a98ec66672b3
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringAsyncClient.java
@@ -0,0 +1,3981 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.ai.language.text.authoring;
+
+import com.azure.ai.language.text.authoring.implementation.JsonMergePatchHelper;
+import com.azure.ai.language.text.authoring.implementation.TextAnalysisAuthoringsImpl;
+import com.azure.ai.language.text.authoring.implementation.models.CopyProjectAuthorizationRequest;
+import com.azure.ai.language.text.authoring.models.ExportedProject;
+import com.azure.ai.language.text.authoring.models.ProjectKind;
+import com.azure.ai.language.text.authoring.models.StringIndexType;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignDeploymentResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignDeploymentResourcesOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignedDeploymentResource;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignedProjectDeploymentsMetadata;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCopyProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCopyProjectOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCreateDeploymentOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCreateProjectOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeleteDeploymentOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeploymentJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDocumentEvaluationResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationJobResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationSummary;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelManifest;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedTrainedModel;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringImportProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringLoadSnapshotJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringPrebuiltEntity;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectDeletionJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectDeployment;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectMetadata;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectTrainedModel;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSupportedLanguage;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSwapDeploymentsJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSwapDeploymentsOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingConfigVersion;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringUnassignDeploymentResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringUnassignDeploymentResourcesOptions;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the asynchronous AuthoringClient type.
+ */
+@ServiceClient(builder = AuthoringClientBuilder.class, isAsync = true)
+public final class AuthoringAsyncClient {
+ @Generated
+ private final TextAnalysisAuthoringsImpl serviceClient;
+
+ /**
+ * Initializes an instance of AuthoringAsyncClient class.
+ *
+ * @param serviceClient the service client implementation.
+ */
+ @Generated
+ AuthoringAsyncClient(TextAnalysisAuthoringsImpl serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ /**
+ * Lists the existing projects.
+ *
Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listProjects(RequestOptions requestOptions) {
+ return this.serviceClient.listProjectsAsync(requestOptions);
+ }
+
+ /**
+ * Gets the details of a project.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a project along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getProjectWithResponse(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.getProjectWithResponseAsync(projectName, requestOptions);
+ }
+
+ /**
+ * The most basic operation that applies to a resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Optional, Required on create)
+ * storageInputContainerName: String (Optional, Required on create)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Optional, Required on create)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Optional, Required on create)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param body The request body.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents the metadata of a project along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createProjectWithResponse(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createProjectWithResponseAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Deletes a project.
+ *
+ * @param projectName The name of the project to use.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteProject(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteProjectAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Optional)
+ * allowOverwrite: Boolean (Optional)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * targetProjectName: String (Required)
+ * accessToken: String (Required)
+ * expiresAt: OffsetDateTime (Required)
+ * targetResourceId: String (Required)
+ * targetResourceRegion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param copyProjectAuthorizationRequest The copyProjectAuthorizationRequest parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents the options for copying an existing project to another Azure resource along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> copyProjectAuthorizationWithResponse(String projectName,
+ BinaryData copyProjectAuthorizationRequest, RequestOptions requestOptions) {
+ return this.serviceClient.copyProjectAuthorizationWithResponseAsync(projectName,
+ copyProjectAuthorizationRequest, requestOptions);
+ }
+
+ /**
+ * Copies an existing project to another Azure resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * targetProjectName: String (Required)
+ * accessToken: String (Required)
+ * expiresAt: OffsetDateTime (Required)
+ * targetResourceId: String (Required)
+ * targetResourceRegion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The copy project info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCopyProject(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginCopyProjectAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | assetKind | String | No | Kind of asset to export. |
+ * | trainedModelLabel | String | No | Trained model label to export. If the
+ * trainedModelLabel is null, the default behavior is to export the current working copy. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit".
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginExport(String projectName, String stringIndexType,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginExportAsync(projectName, stringIndexType, requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ * Header Parameters
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | format | String | No | The format of the project to import. The currently supported
+ * formats are json and aml formats. If not provided, the default is set to json. |
+ *
+ * You can add these to a request with {@link RequestOptions#addHeader}
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectFileVersion: String (Required)
+ * stringIndexType: String(Utf16CodeUnit) (Required)
+ * metadata (Required): {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Optional, Required on create)
+ * storageInputContainerName: String (Optional, Required on create)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Optional, Required on create)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Optional, Required on create)
+ * }
+ * assets (Optional): {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginImportMethod(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginImportMethodAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Triggers a training job for a project.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * evaluationOptions (Optional): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * dataGenerationSettings (Optional): {
+ * enableDataGeneration: boolean (Required)
+ * dataGenerationConnectionInfo (Required): {
+ * kind: String (Required)
+ * resourceId: String (Required)
+ * deploymentName: String (Required)
+ * }
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The training input parameters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginTrain(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginTrainAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing copy project job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing copy project job along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getCopyProjectStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getCopyProjectStatusWithResponseAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * deploymentName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * assignedResources (Required): [
+ * (Required){
+ * resourceId: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeployments(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listDeploymentsAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of a deployment.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * deploymentName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * assignedResources (Required): [
+ * (Required){
+ * resourceId: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a deployment along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getDeploymentWithResponse(String projectName, String deploymentName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentWithResponseAsync(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Creates a new deployment or replaces an existing one.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainedModelLabel: String (Required)
+ * assignedResourceIds (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The new deployment info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeployProject(String projectName, String deploymentName,
+ BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeployProjectAsync(projectName, deploymentName, body, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteDeployment(String projectName, String deploymentName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteDeploymentAsync(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment from the specified assigned resources.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * assignedResourceIds (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The options for deleting the deployment.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteDeploymentFromResources(String projectName,
+ String deploymentName, BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteDeploymentFromResourcesAsync(projectName, deploymentName, body,
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing delete deployment from specific resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing delete deployment from specific resources job along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getDeploymentDeleteFromResourcesStatusWithResponse(String projectName,
+ String deploymentName, String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentDeleteFromResourcesStatusWithResponseAsync(projectName, deploymentName,
+ jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing deployment job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing deployment job along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getDeploymentStatusWithResponse(String projectName, String deploymentName,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentStatusWithResponseAsync(projectName, deploymentName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Swaps two existing deployments with each other.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * firstDeploymentName: String (Required)
+ * secondDeploymentName: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The job object to swap two deployments.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginSwapDeployments(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginSwapDeploymentsAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing swap deployment job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing swap deployment job along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getSwapDeploymentsStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getSwapDeploymentsStatusWithResponseAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status of an export job. Once job completes, returns the project metadata, and assets.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * resultUrl: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an export job along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getExportStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportStatusWithResponseAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * exportedModelName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastExportedModelDateTime: OffsetDateTime (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listExportedModels(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listExportedModelsAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of an exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * exportedModelName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastExportedModelDateTime: OffsetDateTime (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of an exported model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getExportedModelWithResponse(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelWithResponseAsync(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Creates a new exported model or replaces an existing one.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainedModelLabel: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param body The exported model info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCreateOrUpdateExportedModel(String projectName,
+ String exportedModelName, BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginCreateOrUpdateExportedModelAsync(projectName, exportedModelName, body,
+ requestOptions);
+ }
+
+ /**
+ * Deletes an existing exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteExportedModel(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteExportedModelAsync(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Gets the status for an existing job to create or update an exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an existing job to create or update an exported model along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getExportedModelJobStatusWithResponse(String projectName,
+ String exportedModelName, String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelJobStatusWithResponseAsync(projectName, exportedModelName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Gets the details and URL needed to download the exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * modelFiles (Required): [
+ * (Required){
+ * name: String (Required)
+ * contentUri: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details and URL needed to download the exported model along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getExportedModelManifestWithResponse(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelManifestWithResponseAsync(projectName, exportedModelName,
+ requestOptions);
+ }
+
+ /**
+ * Gets the status for an import.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an import along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getImportStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getImportStatusWithResponseAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * label: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastTrainingDurationInSeconds: int (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * hasSnapshot: boolean (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainedModels(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listTrainedModelsAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of a trained model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * label: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastTrainingDurationInSeconds: int (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * hasSnapshot: boolean (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a trained model along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTrainedModelWithResponse(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTrainedModelWithResponseAsync(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Deletes an existing trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteTrainedModelWithResponse(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteTrainedModelWithResponseAsync(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Triggers evaluation operation on a trained model.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param body The training input parameters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginEvaluateModel(String projectName, String trainedModelLabel,
+ BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginEvaluateModelAsync(projectName, trainedModelLabel, body, requestOptions);
+ }
+
+ /**
+ * Long-running operation.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginLoadSnapshot(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginLoadSnapshotAsync(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Gets the status for an evaluation job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * evaluationOptions (Required): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * percentComplete: int (Required)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an evaluation job along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getEvaluationStatusWithResponse(String projectName, String trainedModelLabel,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getEvaluationStatusWithResponseAsync(projectName, trainedModelLabel, jobId,
+ requestOptions);
+ }
+
+ /**
+ * 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.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * location: String (Required)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit".
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the detailed results of the evaluation for a trained model as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getModelEvaluationResults(String projectName, String trainedModelLabel,
+ String stringIndexType, RequestOptions requestOptions) {
+ return this.serviceClient.getModelEvaluationResultsAsync(projectName, trainedModelLabel, stringIndexType,
+ requestOptions);
+ }
+
+ /**
+ * Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the
+ * model e.g., F1, Precision, Recall, etc.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * evaluationOptions (Required): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the evaluation summary of a trained model along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getModelEvaluationSummaryWithResponse(String projectName,
+ String trainedModelLabel, RequestOptions requestOptions) {
+ return this.serviceClient.getModelEvaluationSummaryWithResponseAsync(projectName, trainedModelLabel,
+ requestOptions);
+ }
+
+ /**
+ * Gets the status for loading a snapshot.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for loading a snapshot along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getLoadSnapshotStatusWithResponse(String projectName, String trainedModelLabel,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getLoadSnapshotStatusWithResponseAsync(projectName, trainedModelLabel, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * azureResourceId: String (Required)
+ * region: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentResources(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listDeploymentResourcesAsync(projectName, requestOptions);
+ }
+
+ /**
+ * 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.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * resourcesMetadata (Required): [
+ * (Required){
+ * azureResourceId: String (Required)
+ * customDomain: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The new project resources info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginAssignDeploymentResources(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginAssignDeploymentResourcesAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes
+ * existing deployments assigned to them.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * assignedResourceIds (Required): [
+ * String (Required)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The info for the deployment resources to be deleted.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginUnassignDeploymentResources(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginUnassignDeploymentResourcesAsync(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing assign deployment resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing assign deployment resources job along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getAssignDeploymentResourcesStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getAssignDeploymentResourcesStatusWithResponseAsync(projectName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing unassign deployment resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing unassign deployment resources job along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getUnassignDeploymentResourcesStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getUnassignDeploymentResourcesStatusWithResponseAsync(projectName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * trainingStatus (Required): {
+ * percentComplete: int (Required)
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * }
+ * evaluationStatus (Optional): (recursive schema, see evaluationStatus above)
+ * estimatedEndDateTime: OffsetDateTime (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingJobs(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listTrainingJobsAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the status for a training job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * trainingStatus (Required): {
+ * percentComplete: int (Required)
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * }
+ * evaluationStatus (Optional): (recursive schema, see evaluationStatus above)
+ * estimatedEndDateTime: OffsetDateTime (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for a training job along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTrainingStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTrainingStatusWithResponseAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Triggers a cancellation for a running training job.
+ *
+ * @param projectName The name of the project to use.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCancelTrainingJob(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginCancelTrainingJobAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status for a project deletion job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for a project deletion job along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getProjectDeletionStatusWithResponse(String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getProjectDeletionStatusWithResponseAsync(jobId, requestOptions);
+ }
+
+ /**
+ * 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.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectName: String (Required)
+ * deploymentsMetadata (Required): [
+ * (Required){
+ * deploymentName: String (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringAssignedProjectDeploymentsMetadata items as paginated response
+ * with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listAssignedResourceDeployments(RequestOptions requestOptions) {
+ return this.serviceClient.listAssignedResourceDeploymentsAsync(requestOptions);
+ }
+
+ /**
+ * Lists the supported languages.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | projectKind | String | No | The project kind, default value is
+ * CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification",
+ * "CustomMultiLabelClassification", "CustomEntityRecognition", "CustomAbstractiveSummarization",
+ * "CustomHealthcare", "CustomTextSentiment". |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * languageName: String (Required)
+ * languageCode: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringSupportedLanguage items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getSupportedLanguages(RequestOptions requestOptions) {
+ return this.serviceClient.getSupportedLanguagesAsync(requestOptions);
+ }
+
+ /**
+ * Lists the supported prebuilt entities that can be used while creating composed entities.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * category: String (Required)
+ * description: String (Required)
+ * examples: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringPrebuiltEntity items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getSupportedPrebuiltEntities(RequestOptions requestOptions) {
+ return this.serviceClient.getSupportedPrebuiltEntitiesAsync(requestOptions);
+ }
+
+ /**
+ * Lists the support training config version for a given project type.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | projectKind | String | No | The project kind, default value is
+ * CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification",
+ * "CustomMultiLabelClassification", "CustomEntityRecognition", "CustomAbstractiveSummarization",
+ * "CustomHealthcare", "CustomTextSentiment". |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainingConfigVersion: String (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringTrainingConfigVersion items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingConfigVersions(RequestOptions requestOptions) {
+ return this.serviceClient.listTrainingConfigVersionsAsync(requestOptions);
+ }
+
+ /**
+ * Lists the existing projects.
+ *
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listProjects(Integer top, Integer skip) {
+ // Generated convenience method for listProjects
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listProjects(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectMetadata.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the existing projects.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listProjects() {
+ // Generated convenience method for listProjects
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listProjects(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectMetadata.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the details of a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a project on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getProject(String projectName) {
+ // Generated convenience method for getProjectWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getProjectWithResponse(projectName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectMetadata.class));
+ }
+
+ /**
+ * The most basic operation that applies to a resource.
+ *
+ * @param projectName The new project name.
+ * @param body The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the metadata of a project on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createProject(String projectName,
+ TextAnalysisAuthoringCreateProjectOptions body) {
+ // Generated convenience method for createProjectWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTextAnalysisAuthoringCreateProjectOptionsAccessor()
+ .prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTextAnalysisAuthoringCreateProjectOptionsAccessor()
+ .prepareModelForJsonMergePatch(body, false);
+ return createProjectWithResponse(projectName, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectMetadata.class));
+ }
+
+ /**
+ * Deletes a project.
+ *
+ * @param projectName The name of the project to use.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteProject(String projectName) {
+ // Generated convenience method for beginDeleteProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteProjectWithModelAsync(projectName, requestOptions);
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ *
+ * @param projectName The new project name.
+ * @param projectKind Represents the project kind.
+ * @param storageInputContainerName The name of the storage container.
+ * @param allowOverwrite Whether to allow an existing project to be overwritten using the resulting copy
+ * authorization.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the options for copying an existing project to another Azure resource on successful completion
+ * of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono copyProjectAuthorization(String projectName,
+ ProjectKind projectKind, String storageInputContainerName, Boolean allowOverwrite) {
+ // Generated convenience method for copyProjectAuthorizationWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ CopyProjectAuthorizationRequest copyProjectAuthorizationRequestObj
+ = new CopyProjectAuthorizationRequest(projectKind).setStorageInputContainerName(storageInputContainerName)
+ .setAllowOverwrite(allowOverwrite);
+ BinaryData copyProjectAuthorizationRequest = BinaryData.fromObject(copyProjectAuthorizationRequestObj);
+ return copyProjectAuthorizationWithResponse(projectName, copyProjectAuthorizationRequest, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringCopyProjectOptions.class));
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ *
+ * @param projectName The new project name.
+ * @param projectKind Represents the project kind.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the options for copying an existing project to another Azure resource on successful completion
+ * of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono copyProjectAuthorization(String projectName,
+ ProjectKind projectKind) {
+ // Generated convenience method for copyProjectAuthorizationWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ CopyProjectAuthorizationRequest copyProjectAuthorizationRequestObj
+ = new CopyProjectAuthorizationRequest(projectKind);
+ BinaryData copyProjectAuthorizationRequest = BinaryData.fromObject(copyProjectAuthorizationRequestObj);
+ return copyProjectAuthorizationWithResponse(projectName, copyProjectAuthorizationRequest, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringCopyProjectOptions.class));
+ }
+
+ /**
+ * Copies an existing project to another Azure resource.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The copy project info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCopyProject(String projectName,
+ TextAnalysisAuthoringCopyProjectOptions body) {
+ // Generated convenience method for beginCopyProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginCopyProjectWithModelAsync(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @param assetKind Kind of asset to export.
+ * @param trainedModelLabel Trained model label to export. If the trainedModelLabel is null, the default behavior is
+ * to export the current working copy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginExport(String projectName,
+ StringIndexType stringIndexType, String assetKind, String trainedModelLabel) {
+ // Generated convenience method for beginExportWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ if (assetKind != null) {
+ requestOptions.addQueryParam("assetKind", assetKind, false);
+ }
+ if (trainedModelLabel != null) {
+ requestOptions.addQueryParam("trainedModelLabel", trainedModelLabel, false);
+ }
+ return serviceClient.beginExportWithModelAsync(projectName, stringIndexType.toString(), requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginExport(String projectName,
+ StringIndexType stringIndexType) {
+ // Generated convenience method for beginExportWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginExportWithModelAsync(projectName, stringIndexType.toString(), requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @param format The format of the project to import. The currently supported formats are json and aml formats. If
+ * not provided, the default is set to json.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginImportMethod(String projectName,
+ ExportedProject body, String format) {
+ // Generated convenience method for beginImportMethodWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ if (format != null) {
+ requestOptions.setHeader(HttpHeaderName.fromString("format"), format);
+ }
+ return serviceClient.beginImportMethodWithModelAsync(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginImportMethod(String projectName,
+ ExportedProject body) {
+ // Generated convenience method for beginImportMethodWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginImportMethodWithModelAsync(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a training job for a project.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The training input parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginTrain(String projectName, TextAnalysisAuthoringTrainingJobOptions body) {
+ // Generated convenience method for beginTrainWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginTrainWithModelAsync(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing copy project job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing copy project job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getCopyProjectStatus(String projectName, String jobId) {
+ // Generated convenience method for getCopyProjectStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getCopyProjectStatusWithResponse(projectName, jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringCopyProjectJobState.class));
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeployments(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listDeployments(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(
+ protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectDeployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeployments(String projectName) {
+ // Generated convenience method for listDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDeployments(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(
+ protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectDeployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the details of a deployment.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a deployment on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeployment(String projectName, String deploymentName) {
+ // Generated convenience method for getDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentWithResponse(projectName, deploymentName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectDeployment.class));
+ }
+
+ /**
+ * Creates a new deployment or replaces an existing one.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The new deployment info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeployProject(String projectName,
+ String deploymentName, TextAnalysisAuthoringCreateDeploymentOptions body) {
+ // Generated convenience method for beginDeployProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeployProjectWithModelAsync(projectName, deploymentName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteDeployment(String projectName,
+ String deploymentName) {
+ // Generated convenience method for beginDeleteDeploymentWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteDeploymentWithModelAsync(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment from the specified assigned resources.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The options for deleting the deployment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginDeleteDeploymentFromResources(String projectName, String deploymentName,
+ TextAnalysisAuthoringDeleteDeploymentOptions body) {
+ // Generated convenience method for beginDeleteDeploymentFromResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteDeploymentFromResourcesWithModelAsync(projectName, deploymentName,
+ BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing delete deployment from specific resources job.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing delete deployment from specific resources job on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono
+ getDeploymentDeleteFromResourcesStatus(String projectName, String deploymentName, String jobId) {
+ // Generated convenience method for getDeploymentDeleteFromResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentDeleteFromResourcesStatusWithResponse(projectName, deploymentName, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState.class));
+ }
+
+ /**
+ * Gets the status of an existing deployment job.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing deployment job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeploymentStatus(String projectName, String deploymentName,
+ String jobId) {
+ // Generated convenience method for getDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentStatusWithResponse(projectName, deploymentName, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringDeploymentJobState.class));
+ }
+
+ /**
+ * Swaps two existing deployments with each other.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The job object to swap two deployments.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginSwapDeployments(String projectName,
+ TextAnalysisAuthoringSwapDeploymentsOptions body) {
+ // Generated convenience method for beginSwapDeploymentsWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginSwapDeploymentsWithModelAsync(projectName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing swap deployment job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing swap deployment job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getSwapDeploymentsStatus(String projectName,
+ String jobId) {
+ // Generated convenience method for getSwapDeploymentsStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getSwapDeploymentsStatusWithResponse(projectName, jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringSwapDeploymentsJobState.class));
+ }
+
+ /**
+ * Gets the status of an export job. Once job completes, returns the project metadata, and assets.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an export job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getExportStatus(String projectName, String jobId) {
+ // Generated convenience method for getExportStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportStatusWithResponse(projectName, jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringExportProjectJobState.class));
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listExportedModels(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listExportedModels
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listExportedModels(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringExportedTrainedModel.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listExportedModels(String projectName) {
+ // Generated convenience method for listExportedModels
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listExportedModels(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringExportedTrainedModel.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the details of an exported model.
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of an exported model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getExportedModel(String projectName,
+ String exportedModelName) {
+ // Generated convenience method for getExportedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelWithResponse(projectName, exportedModelName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringExportedTrainedModel.class));
+ }
+
+ /**
+ * Creates a new exported model or replaces an existing one.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param body The exported model info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginCreateOrUpdateExportedModel(
+ String projectName, String exportedModelName, TextAnalysisAuthoringExportedModelOptions body) {
+ // Generated convenience method for beginCreateOrUpdateExportedModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginCreateOrUpdateExportedModelWithModelAsync(projectName, exportedModelName,
+ BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Deletes an existing exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginDeleteExportedModel(String projectName,
+ String exportedModelName) {
+ // Generated convenience method for beginDeleteExportedModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteExportedModelWithModelAsync(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Gets the status for an existing job to create or update an exported model.
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an existing job to create or update an exported model on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getExportedModelJobStatus(String projectName,
+ String exportedModelName, String jobId) {
+ // Generated convenience method for getExportedModelJobStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelJobStatusWithResponse(projectName, exportedModelName, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringExportedModelJobState.class));
+ }
+
+ /**
+ * Gets the details and URL needed to download the exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details and URL needed to download the exported model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getExportedModelManifest(String projectName,
+ String exportedModelName) {
+ // Generated convenience method for getExportedModelManifestWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelManifestWithResponse(projectName, exportedModelName, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringExportedModelManifest.class));
+ }
+
+ /**
+ * Gets the status for an import.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an import on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getImportStatus(String projectName, String jobId) {
+ // Generated convenience method for getImportStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getImportStatusWithResponse(projectName, jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringImportProjectJobState.class));
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainedModels(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listTrainedModels
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listTrainedModels(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringProjectTrainedModel.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainedModels(String projectName) {
+ // Generated convenience method for listTrainedModels
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTrainedModels(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringProjectTrainedModel.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the details of a trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a trained model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTrainedModel(String projectName,
+ String trainedModelLabel) {
+ // Generated convenience method for getTrainedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectTrainedModel.class));
+ }
+
+ /**
+ * Deletes an existing trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteTrainedModel(String projectName, String trainedModelLabel) {
+ // Generated convenience method for deleteTrainedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Triggers evaluation operation on a trained model.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param body The training input parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginEvaluateModel(String projectName, String trainedModelLabel, TextAnalysisAuthoringEvaluationOptions body) {
+ // Generated convenience method for beginEvaluateModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginEvaluateModelWithModelAsync(projectName, trainedModelLabel,
+ BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Long-running operation.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginLoadSnapshot(String projectName,
+ String trainedModelLabel) {
+ // Generated convenience method for beginLoadSnapshotWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginLoadSnapshotWithModelAsync(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Gets the status for an evaluation job.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an evaluation job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getEvaluationStatus(String projectName,
+ String trainedModelLabel, String jobId) {
+ // Generated convenience method for getEvaluationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getEvaluationStatusWithResponse(projectName, trainedModelLabel, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringEvaluationJobState.class));
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the detailed results of the evaluation for a trained model as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getModelEvaluationResults(String projectName,
+ String trainedModelLabel, StringIndexType stringIndexType, Integer top, Integer skip) {
+ // Generated convenience method for getModelEvaluationResults
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse
+ = getModelEvaluationResults(projectName, trainedModelLabel, stringIndexType.toString(), requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringDocumentEvaluationResult.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the detailed results of the evaluation for a trained model as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getModelEvaluationResults(String projectName,
+ String trainedModelLabel, StringIndexType stringIndexType) {
+ // Generated convenience method for getModelEvaluationResults
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse
+ = getModelEvaluationResults(projectName, trainedModelLabel, stringIndexType.toString(), requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringDocumentEvaluationResult.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the
+ * model e.g., F1, Precision, Recall, etc.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the evaluation summary of a trained model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getModelEvaluationSummary(String projectName,
+ String trainedModelLabel) {
+ // Generated convenience method for getModelEvaluationSummaryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getModelEvaluationSummaryWithResponse(projectName, trainedModelLabel, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringEvaluationSummary.class));
+ }
+
+ /**
+ * Gets the status for loading a snapshot.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for loading a snapshot on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLoadSnapshotStatus(String projectName,
+ String trainedModelLabel, String jobId) {
+ // Generated convenience method for getLoadSnapshotStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLoadSnapshotStatusWithResponse(projectName, trainedModelLabel, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringLoadSnapshotJobState.class));
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentResources(String projectName,
+ Integer top, Integer skip) {
+ // Generated convenience method for listDeploymentResources
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listDeploymentResources(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringAssignedDeploymentResource.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentResources(String projectName) {
+ // Generated convenience method for listDeploymentResources
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDeploymentResources(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringAssignedDeploymentResource.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The new project resources info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginAssignDeploymentResources(String projectName, TextAnalysisAuthoringAssignDeploymentResourcesOptions body) {
+ // Generated convenience method for beginAssignDeploymentResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginAssignDeploymentResourcesWithModelAsync(projectName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes
+ * existing deployments assigned to them.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The info for the deployment resources to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginUnassignDeploymentResources(
+ String projectName, TextAnalysisAuthoringUnassignDeploymentResourcesOptions body) {
+ // Generated convenience method for beginUnassignDeploymentResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginUnassignDeploymentResourcesWithModelAsync(projectName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing assign deployment resources job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing assign deployment resources job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono
+ getAssignDeploymentResourcesStatus(String projectName, String jobId) {
+ // Generated convenience method for getAssignDeploymentResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getAssignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringAssignDeploymentResourcesJobState.class));
+ }
+
+ /**
+ * Gets the status of an existing unassign deployment resources job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing unassign deployment resources job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono
+ getUnassignDeploymentResourcesStatus(String projectName, String jobId) {
+ // Generated convenience method for getUnassignDeploymentResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUnassignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringUnassignDeploymentResourcesJobState.class));
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingJobs(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listTrainingJobs
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listTrainingJobs(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringTrainingJobState.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingJobs(String projectName) {
+ // Generated convenience method for listTrainingJobs
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTrainingJobs(projectName, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringTrainingJobState.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the status for a training job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for a training job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTrainingStatus(String projectName, String jobId) {
+ // Generated convenience method for getTrainingStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTrainingStatusWithResponse(projectName, jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringTrainingJobState.class));
+ }
+
+ /**
+ * Triggers a cancellation for a running training job.
+ *
+ * @param projectName The name of the project to use.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginCancelTrainingJob(String projectName, String jobId) {
+ // Generated convenience method for beginCancelTrainingJobWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginCancelTrainingJobWithModelAsync(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status for a project deletion job.
+ *
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for a project deletion job on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getProjectDeletionStatus(String jobId) {
+ // Generated convenience method for getProjectDeletionStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getProjectDeletionStatusWithResponse(jobId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringProjectDeletionJobState.class));
+ }
+
+ /**
+ * 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.
+ *
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedProjectDeploymentsMetadata items as paginated response
+ * with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux
+ listAssignedResourceDeployments(Integer top, Integer skip) {
+ // Generated convenience method for listAssignedResourceDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listAssignedResourceDeployments(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(
+ pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringAssignedProjectDeploymentsMetadata.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedProjectDeploymentsMetadata items as paginated response
+ * with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listAssignedResourceDeployments() {
+ // Generated convenience method for listAssignedResourceDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listAssignedResourceDeployments(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(
+ pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringAssignedProjectDeploymentsMetadata.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the supported languages.
+ *
+ * @param projectKind The project kind, default value is CustomSingleLabelClassification.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringSupportedLanguage items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getSupportedLanguages(ProjectKind projectKind, Integer top,
+ Integer skip) {
+ // Generated convenience method for getSupportedLanguages
+ RequestOptions requestOptions = new RequestOptions();
+ if (projectKind != null) {
+ requestOptions.addQueryParam("projectKind", projectKind.toString(), false);
+ }
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = getSupportedLanguages(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(
+ protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringSupportedLanguage.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the supported languages.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringSupportedLanguage items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getSupportedLanguages() {
+ // Generated convenience method for getSupportedLanguages
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = getSupportedLanguages(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(
+ protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringSupportedLanguage.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the supported prebuilt entities that can be used while creating composed entities.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringPrebuiltEntity items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux getSupportedPrebuiltEntities() {
+ // Generated convenience method for getSupportedPrebuiltEntities
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = getSupportedPrebuiltEntities(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TextAnalysisAuthoringPrebuiltEntity.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the support training config version for a given project type.
+ *
+ * @param projectKind The project kind, default value is CustomSingleLabelClassification.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingConfigVersion items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingConfigVersions(ProjectKind projectKind,
+ Integer top, Integer skip) {
+ // Generated convenience method for listTrainingConfigVersions
+ RequestOptions requestOptions = new RequestOptions();
+ if (projectKind != null) {
+ requestOptions.addQueryParam("projectKind", projectKind.toString(), false);
+ }
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ PagedFlux pagedFluxResponse = listTrainingConfigVersions(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringTrainingConfigVersion.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Lists the support training config version for a given project type.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingConfigVersion items as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTrainingConfigVersions() {
+ // Generated convenience method for listTrainingConfigVersions
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTrainingConfigVersions(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData
+ .toObject(TextAnalysisAuthoringTrainingConfigVersion.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+}
diff --git a/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringClient.java b/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringClient.java
new file mode 100644
index 000000000000..f7e21f94aea5
--- /dev/null
+++ b/sdk/cognitivelanguage/azure-ai-language-text-authoring/src/main/java/com/azure/ai/language/text/authoring/AuthoringClient.java
@@ -0,0 +1,3691 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.ai.language.text.authoring;
+
+import com.azure.ai.language.text.authoring.implementation.JsonMergePatchHelper;
+import com.azure.ai.language.text.authoring.implementation.TextAnalysisAuthoringsImpl;
+import com.azure.ai.language.text.authoring.implementation.models.CopyProjectAuthorizationRequest;
+import com.azure.ai.language.text.authoring.models.ExportedProject;
+import com.azure.ai.language.text.authoring.models.ProjectKind;
+import com.azure.ai.language.text.authoring.models.StringIndexType;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignDeploymentResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignDeploymentResourcesOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignedDeploymentResource;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringAssignedProjectDeploymentsMetadata;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCopyProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCopyProjectOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCreateDeploymentOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringCreateProjectOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeleteDeploymentOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDeploymentJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringDocumentEvaluationResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationJobResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringEvaluationSummary;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelManifest;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedModelOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringExportedTrainedModel;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringImportProjectJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringLoadSnapshotJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringPrebuiltEntity;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectDeletionJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectDeployment;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectMetadata;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringProjectTrainedModel;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSupportedLanguage;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSwapDeploymentsJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringSwapDeploymentsOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingConfigVersion;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobOptions;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobResult;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringTrainingJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringUnassignDeploymentResourcesJobState;
+import com.azure.ai.language.text.authoring.models.TextAnalysisAuthoringUnassignDeploymentResourcesOptions;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
+import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.RequestOptions;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.polling.SyncPoller;
+
+/**
+ * Initializes a new instance of the synchronous AuthoringClient type.
+ */
+@ServiceClient(builder = AuthoringClientBuilder.class)
+public final class AuthoringClient {
+ @Generated
+ private final TextAnalysisAuthoringsImpl serviceClient;
+
+ /**
+ * Initializes an instance of AuthoringClient class.
+ *
+ * @param serviceClient the service client implementation.
+ */
+ @Generated
+ AuthoringClient(TextAnalysisAuthoringsImpl serviceClient) {
+ this.serviceClient = serviceClient;
+ }
+
+ /**
+ * Lists the existing projects.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listProjects(RequestOptions requestOptions) {
+ return this.serviceClient.listProjects(requestOptions);
+ }
+
+ /**
+ * Gets the details of a project.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a project along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getProjectWithResponse(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.getProjectWithResponse(projectName, requestOptions);
+ }
+
+ /**
+ * The most basic operation that applies to a resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Optional, Required on create)
+ * storageInputContainerName: String (Optional, Required on create)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Optional, Required on create)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Optional, Required on create)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * createdDateTime: OffsetDateTime (Required)
+ * lastModifiedDateTime: OffsetDateTime (Required)
+ * lastTrainedDateTime: OffsetDateTime (Optional)
+ * lastDeployedDateTime: OffsetDateTime (Optional)
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Required)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Required)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param body The request body.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents the metadata of a project along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createProjectWithResponse(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createProjectWithResponse(projectName, body, requestOptions);
+ }
+
+ /**
+ * Deletes a project.
+ *
+ * @param projectName The name of the project to use.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteProject(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteProject(projectName, requestOptions);
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * storageInputContainerName: String (Optional)
+ * allowOverwrite: Boolean (Optional)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * targetProjectName: String (Required)
+ * accessToken: String (Required)
+ * expiresAt: OffsetDateTime (Required)
+ * targetResourceId: String (Required)
+ * targetResourceRegion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param copyProjectAuthorizationRequest The copyProjectAuthorizationRequest parameter.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return represents the options for copying an existing project to another Azure resource along with
+ * {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response copyProjectAuthorizationWithResponse(String projectName,
+ BinaryData copyProjectAuthorizationRequest, RequestOptions requestOptions) {
+ return this.serviceClient.copyProjectAuthorizationWithResponse(projectName, copyProjectAuthorizationRequest,
+ requestOptions);
+ }
+
+ /**
+ * Copies an existing project to another Azure resource.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * targetProjectName: String (Required)
+ * accessToken: String (Required)
+ * expiresAt: OffsetDateTime (Required)
+ * targetResourceId: String (Required)
+ * targetResourceRegion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The copy project info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCopyProject(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginCopyProject(projectName, body, requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | assetKind | String | No | Kind of asset to export. |
+ * | trainedModelLabel | String | No | Trained model label to export. If the
+ * trainedModelLabel is null, the default behavior is to export the current working copy. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit".
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginExport(String projectName, String stringIndexType,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginExport(projectName, stringIndexType, requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ * Header Parameters
+ *
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | format | String | No | The format of the project to import. The currently supported
+ * formats are json and aml formats. If not provided, the default is set to json. |
+ *
+ * You can add these to a request with {@link RequestOptions#addHeader}
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectFileVersion: String (Required)
+ * stringIndexType: String(Utf16CodeUnit) (Required)
+ * metadata (Required): {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Optional, Required on create)
+ * storageInputContainerName: String (Optional, Required on create)
+ * settings (Optional): {
+ * confidenceThreshold: Double (Optional)
+ * amlProjectPath: String (Optional)
+ * isLabelingLocked: Boolean (Optional)
+ * runGptPredictions: Boolean (Optional)
+ * gptPredictiveLookahead: Integer (Optional)
+ * }
+ * projectName: String (Optional, Required on create)
+ * multilingual: Boolean (Optional)
+ * description: String (Optional)
+ * language: String (Optional, Required on create)
+ * }
+ * assets (Optional): {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginImportMethod(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginImportMethod(projectName, body, requestOptions);
+ }
+
+ /**
+ * Triggers a training job for a project.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * evaluationOptions (Optional): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * dataGenerationSettings (Optional): {
+ * enableDataGeneration: boolean (Required)
+ * dataGenerationConnectionInfo (Required): {
+ * kind: String (Required)
+ * resourceId: String (Required)
+ * deploymentName: String (Required)
+ * }
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The training input parameters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginTrain(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginTrain(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing copy project job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing copy project job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getCopyProjectStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getCopyProjectStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * deploymentName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * assignedResources (Required): [
+ * (Required){
+ * resourceId: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeployments(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listDeployments(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of a deployment.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * deploymentName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * assignedResources (Required): [
+ * (Required){
+ * resourceId: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a deployment along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getDeploymentWithResponse(String projectName, String deploymentName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentWithResponse(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Creates a new deployment or replaces an existing one.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainedModelLabel: String (Required)
+ * assignedResourceIds (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The new deployment info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeployProject(String projectName, String deploymentName,
+ BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeployProject(projectName, deploymentName, body, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteDeployment(String projectName, String deploymentName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteDeployment(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment from the specified assigned resources.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * assignedResourceIds (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The options for deleting the deployment.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteDeploymentFromResources(String projectName,
+ String deploymentName, BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteDeploymentFromResources(projectName, deploymentName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing delete deployment from specific resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing delete deployment from specific resources job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getDeploymentDeleteFromResourcesStatusWithResponse(String projectName,
+ String deploymentName, String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentDeleteFromResourcesStatusWithResponse(projectName, deploymentName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing deployment job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing deployment job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getDeploymentStatusWithResponse(String projectName, String deploymentName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getDeploymentStatusWithResponse(projectName, deploymentName, jobId, requestOptions);
+ }
+
+ /**
+ * Swaps two existing deployments with each other.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * firstDeploymentName: String (Required)
+ * secondDeploymentName: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The job object to swap two deployments.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginSwapDeployments(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginSwapDeployments(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing swap deployment job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing swap deployment job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getSwapDeploymentsStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getSwapDeploymentsStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status of an export job. Once job completes, returns the project metadata, and assets.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * resultUrl: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an export job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExportStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * exportedModelName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastExportedModelDateTime: OffsetDateTime (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExportedModels(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listExportedModels(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of an exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * exportedModelName: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastExportedModelDateTime: OffsetDateTime (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of an exported model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExportedModelWithResponse(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelWithResponse(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Creates a new exported model or replaces an existing one.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainedModelLabel: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param body The exported model info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCreateOrUpdateExportedModel(String projectName,
+ String exportedModelName, BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginCreateOrUpdateExportedModel(projectName, exportedModelName, body,
+ requestOptions);
+ }
+
+ /**
+ * Deletes an existing exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteExportedModel(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginDeleteExportedModel(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Gets the status for an existing job to create or update an exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an existing job to create or update an exported model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExportedModelJobStatusWithResponse(String projectName, String exportedModelName,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelJobStatusWithResponse(projectName, exportedModelName, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Gets the details and URL needed to download the exported model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * modelFiles (Required): [
+ * (Required){
+ * name: String (Required)
+ * contentUri: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details and URL needed to download the exported model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getExportedModelManifestWithResponse(String projectName, String exportedModelName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getExportedModelManifestWithResponse(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Gets the status for an import.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an import along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getImportStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getImportStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * label: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastTrainingDurationInSeconds: int (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * hasSnapshot: boolean (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainedModels(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listTrainedModels(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the details of a trained model.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * label: String (Required)
+ * modelId: String (Required)
+ * lastTrainedDateTime: OffsetDateTime (Required)
+ * lastTrainingDurationInSeconds: int (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * modelTrainingConfigVersion: String (Required)
+ * hasSnapshot: boolean (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the details of a trained model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTrainedModelWithResponse(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Deletes an existing trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteTrainedModelWithResponse(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Triggers evaluation operation on a trained model.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param body The training input parameters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginEvaluateModel(String projectName, String trainedModelLabel,
+ BinaryData body, RequestOptions requestOptions) {
+ return this.serviceClient.beginEvaluateModel(projectName, trainedModelLabel, body, requestOptions);
+ }
+
+ /**
+ * Long-running operation.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginLoadSnapshot(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginLoadSnapshot(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Gets the status for an evaluation job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * evaluationOptions (Required): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * percentComplete: int (Required)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for an evaluation job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getEvaluationStatusWithResponse(String projectName, String trainedModelLabel,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getEvaluationStatusWithResponse(projectName, trainedModelLabel, jobId,
+ requestOptions);
+ }
+
+ /**
+ * 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.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * location: String (Required)
+ * language: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets. Allowed values: "Utf16CodeUnit".
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the detailed results of the evaluation for a trained model as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getModelEvaluationResults(String projectName, String trainedModelLabel,
+ String stringIndexType, RequestOptions requestOptions) {
+ return this.serviceClient.getModelEvaluationResults(projectName, trainedModelLabel, stringIndexType,
+ requestOptions);
+ }
+
+ /**
+ * Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the
+ * model e.g., F1, Precision, Recall, etc.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectKind: String(CustomSingleLabelClassification/CustomMultiLabelClassification/CustomEntityRecognition/CustomAbstractiveSummarization/CustomHealthcare/CustomTextSentiment) (Required)
+ * evaluationOptions (Required): {
+ * kind: String(percentage/manual) (Optional)
+ * trainingSplitPercentage: Integer (Optional)
+ * testingSplitPercentage: Integer (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the evaluation summary of a trained model along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getModelEvaluationSummaryWithResponse(String projectName, String trainedModelLabel,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getModelEvaluationSummaryWithResponse(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Gets the status for loading a snapshot.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for loading a snapshot along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getLoadSnapshotStatusWithResponse(String projectName, String trainedModelLabel,
+ String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getLoadSnapshotStatusWithResponse(projectName, trainedModelLabel, jobId,
+ requestOptions);
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * azureResourceId: String (Required)
+ * region: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentResources(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listDeploymentResources(projectName, requestOptions);
+ }
+
+ /**
+ * 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.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * resourcesMetadata (Required): [
+ * (Required){
+ * azureResourceId: String (Required)
+ * customDomain: String (Required)
+ * region: String (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The new project resources info.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginAssignDeploymentResources(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginAssignDeploymentResources(projectName, body, requestOptions);
+ }
+
+ /**
+ * Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes
+ * existing deployments assigned to them.
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * assignedResourceIds (Required): [
+ * String (Required)
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The name of the project to use.
+ * @param body The info for the deployment resources to be deleted.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginUnassignDeploymentResources(String projectName, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginUnassignDeploymentResources(projectName, body, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing assign deployment resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing assign deployment resources job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getAssignDeploymentResourcesStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getAssignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing unassign deployment resources job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status of an existing unassign deployment resources job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getUnassignDeploymentResourcesStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getUnassignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * trainingStatus (Required): {
+ * percentComplete: int (Required)
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * }
+ * evaluationStatus (Optional): (recursive schema, see evaluationStatus above)
+ * estimatedEndDateTime: OffsetDateTime (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainingJobs(String projectName, RequestOptions requestOptions) {
+ return this.serviceClient.listTrainingJobs(projectName, requestOptions);
+ }
+
+ /**
+ * Gets the status for a training job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * result (Required): {
+ * modelLabel: String (Required)
+ * trainingConfigVersion: String (Required)
+ * trainingStatus (Required): {
+ * percentComplete: int (Required)
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * }
+ * evaluationStatus (Optional): (recursive schema, see evaluationStatus above)
+ * estimatedEndDateTime: OffsetDateTime (Optional)
+ * }
+ * }
+ * }
+ *
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for a training job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTrainingStatusWithResponse(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTrainingStatusWithResponse(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Triggers a cancellation for a running training job.
+ *
+ * @param projectName The name of the project to use.
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCancelTrainingJob(String projectName, String jobId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.beginCancelTrainingJob(projectName, jobId, requestOptions);
+ }
+
+ /**
+ * Gets the status for a project deletion job.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * jobId: String (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * lastUpdatedDateTime: OffsetDateTime (Required)
+ * expirationDateTime: OffsetDateTime (Optional)
+ * status: String(notStarted/running/succeeded/failed/cancelled/cancelling/partiallyCompleted) (Required)
+ * warnings (Optional): [
+ * (Optional){
+ * code: String (Required)
+ * message: String (Required)
+ * }
+ * ]
+ * errors (Optional): [
+ * (Optional){
+ * code: String(InvalidRequest/InvalidArgument/Unauthorized/Forbidden/NotFound/ProjectNotFound/OperationNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchIndexNotFound/TooManyRequests/AzureCognitiveSearchThrottling/AzureCognitiveSearchIndexLimitReached/InternalServerError/ServiceUnavailable/Timeout/QuotaExceeded/Conflict/Warning) (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String(InvalidRequest/InvalidParameterValue/KnowledgeBaseNotFound/AzureCognitiveSearchNotFound/AzureCognitiveSearchThrottling/ExtractionFailure/InvalidRequestBodyFormat/EmptyRequest/MissingInputDocuments/InvalidDocument/ModelVersionIncorrect/InvalidDocumentBatch/UnsupportedLanguageCode/InvalidCountryHint) (Required)
+ * message: String (Required)
+ * details (Optional): {
+ * String: String (Required)
+ * }
+ * target: String (Optional)
+ * innererror (Optional): (recursive schema, see innererror above)
+ * }
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param jobId The job ID.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the status for a project deletion job along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getProjectDeletionStatusWithResponse(String jobId, RequestOptions requestOptions) {
+ return this.serviceClient.getProjectDeletionStatusWithResponse(jobId, requestOptions);
+ }
+
+ /**
+ * 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.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * projectName: String (Required)
+ * deploymentsMetadata (Required): [
+ * (Required){
+ * deploymentName: String (Required)
+ * lastDeployedDateTime: OffsetDateTime (Required)
+ * deploymentExpirationDate: LocalDate (Required)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringAssignedProjectDeploymentsMetadata items as paginated response
+ * with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listAssignedResourceDeployments(RequestOptions requestOptions) {
+ return this.serviceClient.listAssignedResourceDeployments(requestOptions);
+ }
+
+ /**
+ * Lists the supported languages.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | projectKind | String | No | The project kind, default value is
+ * CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification",
+ * "CustomMultiLabelClassification", "CustomEntityRecognition", "CustomAbstractiveSummarization",
+ * "CustomHealthcare", "CustomTextSentiment". |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * languageName: String (Required)
+ * languageCode: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringSupportedLanguage items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getSupportedLanguages(RequestOptions requestOptions) {
+ return this.serviceClient.getSupportedLanguages(requestOptions);
+ }
+
+ /**
+ * Lists the supported prebuilt entities that can be used while creating composed entities.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * category: String (Required)
+ * description: String (Required)
+ * examples: String (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringPrebuiltEntity items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getSupportedPrebuiltEntities(RequestOptions requestOptions) {
+ return this.serviceClient.getSupportedPrebuiltEntities(requestOptions);
+ }
+
+ /**
+ * Lists the support training config version for a given project type.
+ * Query Parameters
+ *
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | projectKind | String | No | The project kind, default value is
+ * CustomSingleLabelClassification. Allowed values: "CustomSingleLabelClassification",
+ * "CustomMultiLabelClassification", "CustomEntityRecognition", "CustomAbstractiveSummarization",
+ * "CustomHealthcare", "CustomTextSentiment". |
+ * | top | Integer | No | The number of result items to return. |
+ * | skip | Integer | No | The number of result items to skip. |
+ * | maxpagesize | Integer | No | The maximum number of result items per page. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * trainingConfigVersion: String (Required)
+ * modelExpirationDate: LocalDate (Required)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TextAnalysisAuthoringTrainingConfigVersion items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainingConfigVersions(RequestOptions requestOptions) {
+ return this.serviceClient.listTrainingConfigVersions(requestOptions);
+ }
+
+ /**
+ * Lists the existing projects.
+ *
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listProjects(Integer top, Integer skip) {
+ // Generated convenience method for listProjects
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listProjects(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectMetadata.class));
+ }
+
+ /**
+ * Lists the existing projects.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectMetadata items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listProjects() {
+ // Generated convenience method for listProjects
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listProjects(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectMetadata.class));
+ }
+
+ /**
+ * Gets the details of a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a project.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringProjectMetadata getProject(String projectName) {
+ // Generated convenience method for getProjectWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getProjectWithResponse(projectName, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringProjectMetadata.class);
+ }
+
+ /**
+ * The most basic operation that applies to a resource.
+ *
+ * @param projectName The new project name.
+ * @param body The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the metadata of a project.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringProjectMetadata createProject(String projectName,
+ TextAnalysisAuthoringCreateProjectOptions body) {
+ // Generated convenience method for createProjectWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTextAnalysisAuthoringCreateProjectOptionsAccessor()
+ .prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTextAnalysisAuthoringCreateProjectOptionsAccessor()
+ .prepareModelForJsonMergePatch(body, false);
+ return createProjectWithResponse(projectName, bodyInBinaryData, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringProjectMetadata.class);
+ }
+
+ /**
+ * Deletes a project.
+ *
+ * @param projectName The name of the project to use.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteProject(String projectName) {
+ // Generated convenience method for beginDeleteProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteProjectWithModel(projectName, requestOptions);
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ *
+ * @param projectName The new project name.
+ * @param projectKind Represents the project kind.
+ * @param storageInputContainerName The name of the storage container.
+ * @param allowOverwrite Whether to allow an existing project to be overwritten using the resulting copy
+ * authorization.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the options for copying an existing project to another Azure resource.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringCopyProjectOptions copyProjectAuthorization(String projectName, ProjectKind projectKind,
+ String storageInputContainerName, Boolean allowOverwrite) {
+ // Generated convenience method for copyProjectAuthorizationWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ CopyProjectAuthorizationRequest copyProjectAuthorizationRequestObj
+ = new CopyProjectAuthorizationRequest(projectKind).setStorageInputContainerName(storageInputContainerName)
+ .setAllowOverwrite(allowOverwrite);
+ BinaryData copyProjectAuthorizationRequest = BinaryData.fromObject(copyProjectAuthorizationRequestObj);
+ return copyProjectAuthorizationWithResponse(projectName, copyProjectAuthorizationRequest, requestOptions)
+ .getValue()
+ .toObject(TextAnalysisAuthoringCopyProjectOptions.class);
+ }
+
+ /**
+ * Generates a copy project operation authorization to the current target Azure resource.
+ *
+ * @param projectName The new project name.
+ * @param projectKind Represents the project kind.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents the options for copying an existing project to another Azure resource.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringCopyProjectOptions copyProjectAuthorization(String projectName,
+ ProjectKind projectKind) {
+ // Generated convenience method for copyProjectAuthorizationWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ CopyProjectAuthorizationRequest copyProjectAuthorizationRequestObj
+ = new CopyProjectAuthorizationRequest(projectKind);
+ BinaryData copyProjectAuthorizationRequest = BinaryData.fromObject(copyProjectAuthorizationRequestObj);
+ return copyProjectAuthorizationWithResponse(projectName, copyProjectAuthorizationRequest, requestOptions)
+ .getValue()
+ .toObject(TextAnalysisAuthoringCopyProjectOptions.class);
+ }
+
+ /**
+ * Copies an existing project to another Azure resource.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The copy project info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCopyProject(String projectName,
+ TextAnalysisAuthoringCopyProjectOptions body) {
+ // Generated convenience method for beginCopyProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginCopyProjectWithModel(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @param assetKind Kind of asset to export.
+ * @param trainedModelLabel Trained model label to export. If the trainedModelLabel is null, the default behavior is
+ * to export the current working copy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginExport(String projectName,
+ StringIndexType stringIndexType, String assetKind, String trainedModelLabel) {
+ // Generated convenience method for beginExportWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ if (assetKind != null) {
+ requestOptions.addQueryParam("assetKind", assetKind, false);
+ }
+ if (trainedModelLabel != null) {
+ requestOptions.addQueryParam("trainedModelLabel", trainedModelLabel, false);
+ }
+ return serviceClient.beginExportWithModel(projectName, stringIndexType.toString(), requestOptions);
+ }
+
+ /**
+ * Triggers a job to export a project's data.
+ *
+ * @param projectName The name of the project to use.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginExport(String projectName,
+ StringIndexType stringIndexType) {
+ // Generated convenience method for beginExportWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginExportWithModel(projectName, stringIndexType.toString(), requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @param format The format of the project to import. The currently supported formats are json and aml formats. If
+ * not provided, the default is set to json.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginImportMethod(String projectName,
+ ExportedProject body, String format) {
+ // Generated convenience method for beginImportMethodWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ if (format != null) {
+ requestOptions.setHeader(HttpHeaderName.fromString("format"), format);
+ }
+ return serviceClient.beginImportMethodWithModel(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a job to import a project. If a project with the same name already exists, the data of that project is
+ * replaced.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The project data to import.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginImportMethod(String projectName,
+ ExportedProject body) {
+ // Generated convenience method for beginImportMethodWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginImportMethodWithModel(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Triggers a training job for a project.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The training input parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginTrain(String projectName, TextAnalysisAuthoringTrainingJobOptions body) {
+ // Generated convenience method for beginTrainWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginTrainWithModel(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing copy project job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing copy project job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringCopyProjectJobState getCopyProjectStatus(String projectName, String jobId) {
+ // Generated convenience method for getCopyProjectStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getCopyProjectStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringCopyProjectJobState.class);
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeployments(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listDeployments(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectDeployment.class));
+ }
+
+ /**
+ * Lists the deployments belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectDeployment items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeployments(String projectName) {
+ // Generated convenience method for listDeployments
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeployments(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectDeployment.class));
+ }
+
+ /**
+ * Gets the details of a deployment.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a deployment.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringProjectDeployment getDeployment(String projectName, String deploymentName) {
+ // Generated convenience method for getDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentWithResponse(projectName, deploymentName, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringProjectDeployment.class);
+ }
+
+ /**
+ * Creates a new deployment or replaces an existing one.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The new deployment info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeployProject(String projectName,
+ String deploymentName, TextAnalysisAuthoringCreateDeploymentOptions body) {
+ // Generated convenience method for beginDeployProjectWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeployProjectWithModel(projectName, deploymentName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteDeployment(String projectName,
+ String deploymentName) {
+ // Generated convenience method for beginDeleteDeploymentWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteDeploymentWithModel(projectName, deploymentName, requestOptions);
+ }
+
+ /**
+ * Deletes a project deployment from the specified assigned resources.
+ *
+ * @param projectName The name of the project to use.
+ * @param deploymentName The name of the specific deployment of the project to use.
+ * @param body The options for deleting the deployment.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginDeleteDeploymentFromResources(String projectName, String deploymentName,
+ TextAnalysisAuthoringDeleteDeploymentOptions body) {
+ // Generated convenience method for beginDeleteDeploymentFromResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteDeploymentFromResourcesWithModel(projectName, deploymentName,
+ BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing delete deployment from specific resources job.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing delete deployment from specific resources job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState
+ getDeploymentDeleteFromResourcesStatus(String projectName, String deploymentName, String jobId) {
+ // Generated convenience method for getDeploymentDeleteFromResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentDeleteFromResourcesStatusWithResponse(projectName, deploymentName, jobId, requestOptions)
+ .getValue()
+ .toObject(TextAnalysisAuthoringDeploymentDeleteFromResourcesJobState.class);
+ }
+
+ /**
+ * Gets the status of an existing deployment job.
+ *
+ * @param projectName The new project name.
+ * @param deploymentName Represents deployment name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing deployment job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringDeploymentJobState getDeploymentStatus(String projectName, String deploymentName,
+ String jobId) {
+ // Generated convenience method for getDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentStatusWithResponse(projectName, deploymentName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringDeploymentJobState.class);
+ }
+
+ /**
+ * Swaps two existing deployments with each other.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The job object to swap two deployments.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginSwapDeployments(String projectName,
+ TextAnalysisAuthoringSwapDeploymentsOptions body) {
+ // Generated convenience method for beginSwapDeploymentsWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginSwapDeploymentsWithModel(projectName, BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing swap deployment job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing swap deployment job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringSwapDeploymentsJobState getSwapDeploymentsStatus(String projectName, String jobId) {
+ // Generated convenience method for getSwapDeploymentsStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getSwapDeploymentsStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringSwapDeploymentsJobState.class);
+ }
+
+ /**
+ * Gets the status of an export job. Once job completes, returns the project metadata, and assets.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an export job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringExportProjectJobState getExportStatus(String projectName, String jobId) {
+ // Generated convenience method for getExportStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringExportProjectJobState.class);
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExportedModels(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listExportedModels
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listExportedModels(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringExportedTrainedModel.class));
+ }
+
+ /**
+ * Lists the exported models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringExportedTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listExportedModels(String projectName) {
+ // Generated convenience method for listExportedModels
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listExportedModels(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringExportedTrainedModel.class));
+ }
+
+ /**
+ * Gets the details of an exported model.
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of an exported model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringExportedTrainedModel getExportedModel(String projectName, String exportedModelName) {
+ // Generated convenience method for getExportedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelWithResponse(projectName, exportedModelName, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringExportedTrainedModel.class);
+ }
+
+ /**
+ * Creates a new exported model or replaces an existing one.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @param body The exported model info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginCreateOrUpdateExportedModel(
+ String projectName, String exportedModelName, TextAnalysisAuthoringExportedModelOptions body) {
+ // Generated convenience method for beginCreateOrUpdateExportedModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginCreateOrUpdateExportedModelWithModel(projectName, exportedModelName,
+ BinaryData.fromObject(body), requestOptions);
+ }
+
+ /**
+ * Deletes an existing exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginDeleteExportedModel(String projectName,
+ String exportedModelName) {
+ // Generated convenience method for beginDeleteExportedModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteExportedModelWithModel(projectName, exportedModelName, requestOptions);
+ }
+
+ /**
+ * Gets the status for an existing job to create or update an exported model.
+ *
+ * @param projectName The new project name.
+ * @param exportedModelName The exported model name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an existing job to create or update an exported model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringExportedModelJobState getExportedModelJobStatus(String projectName,
+ String exportedModelName, String jobId) {
+ // Generated convenience method for getExportedModelJobStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelJobStatusWithResponse(projectName, exportedModelName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringExportedModelJobState.class);
+ }
+
+ /**
+ * Gets the details and URL needed to download the exported model.
+ *
+ * @param projectName The name of the project to use.
+ * @param exportedModelName The exported model name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details and URL needed to download the exported model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringExportedModelManifest getExportedModelManifest(String projectName,
+ String exportedModelName) {
+ // Generated convenience method for getExportedModelManifestWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getExportedModelManifestWithResponse(projectName, exportedModelName, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringExportedModelManifest.class);
+ }
+
+ /**
+ * Gets the status for an import.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an import.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringImportProjectJobState getImportStatus(String projectName, String jobId) {
+ // Generated convenience method for getImportStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getImportStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringImportProjectJobState.class);
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainedModels(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listTrainedModels
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listTrainedModels(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectTrainedModel.class));
+ }
+
+ /**
+ * Lists the trained models belonging to a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringProjectTrainedModel items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainedModels(String projectName) {
+ // Generated convenience method for listTrainedModels
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listTrainedModels(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringProjectTrainedModel.class));
+ }
+
+ /**
+ * Gets the details of a trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of a trained model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringProjectTrainedModel getTrainedModel(String projectName, String trainedModelLabel) {
+ // Generated convenience method for getTrainedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringProjectTrainedModel.class);
+ }
+
+ /**
+ * Deletes an existing trained model.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteTrainedModel(String projectName, String trainedModelLabel) {
+ // Generated convenience method for deleteTrainedModelWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteTrainedModelWithResponse(projectName, trainedModelLabel, requestOptions).getValue();
+ }
+
+ /**
+ * Triggers evaluation operation on a trained model.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @param body The training input parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginEvaluateModel(String projectName, String trainedModelLabel, TextAnalysisAuthoringEvaluationOptions body) {
+ // Generated convenience method for beginEvaluateModelWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginEvaluateModelWithModel(projectName, trainedModelLabel, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Long-running operation.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginLoadSnapshot(String projectName,
+ String trainedModelLabel) {
+ // Generated convenience method for beginLoadSnapshotWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginLoadSnapshotWithModel(projectName, trainedModelLabel, requestOptions);
+ }
+
+ /**
+ * Gets the status for an evaluation job.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for an evaluation job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringEvaluationJobState getEvaluationStatus(String projectName, String trainedModelLabel,
+ String jobId) {
+ // Generated convenience method for getEvaluationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getEvaluationStatusWithResponse(projectName, trainedModelLabel, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringEvaluationJobState.class);
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the detailed results of the evaluation for a trained model as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getModelEvaluationResults(String projectName,
+ String trainedModelLabel, StringIndexType stringIndexType, Integer top, Integer skip) {
+ // Generated convenience method for getModelEvaluationResults
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient
+ .getModelEvaluationResults(projectName, trainedModelLabel, stringIndexType.toString(), requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringDocumentEvaluationResult.class));
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param stringIndexType Specifies the method used to interpret string offsets. For additional information see
+ * https://aka.ms/text-analytics-offsets.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the detailed results of the evaluation for a trained model as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable getModelEvaluationResults(String projectName,
+ String trainedModelLabel, StringIndexType stringIndexType) {
+ // Generated convenience method for getModelEvaluationResults
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient
+ .getModelEvaluationResults(projectName, trainedModelLabel, stringIndexType.toString(), requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringDocumentEvaluationResult.class));
+ }
+
+ /**
+ * Gets the evaluation summary of a trained model. The summary includes high level performance measurements of the
+ * model e.g., F1, Precision, Recall, etc.
+ *
+ * @param projectName The name of the project to use.
+ * @param trainedModelLabel The trained model label.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the evaluation summary of a trained model.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringEvaluationSummary getModelEvaluationSummary(String projectName,
+ String trainedModelLabel) {
+ // Generated convenience method for getModelEvaluationSummaryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getModelEvaluationSummaryWithResponse(projectName, trainedModelLabel, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringEvaluationSummary.class);
+ }
+
+ /**
+ * Gets the status for loading a snapshot.
+ *
+ * @param projectName The new project name.
+ * @param trainedModelLabel The trained model label.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status for loading a snapshot.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringLoadSnapshotJobState getLoadSnapshotStatus(String projectName, String trainedModelLabel,
+ String jobId) {
+ // Generated convenience method for getLoadSnapshotStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLoadSnapshotStatusWithResponse(projectName, trainedModelLabel, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringLoadSnapshotJobState.class);
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentResources(String projectName,
+ Integer top, Integer skip) {
+ // Generated convenience method for listDeploymentResources
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listDeploymentResources(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringAssignedDeploymentResource.class));
+ }
+
+ /**
+ * Lists the deployments resources assigned to the project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringAssignedDeploymentResource items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentResources(String projectName) {
+ // Generated convenience method for listDeploymentResources
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeploymentResources(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringAssignedDeploymentResource.class));
+ }
+
+ /**
+ * 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.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The new project resources info.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginAssignDeploymentResources(String projectName, TextAnalysisAuthoringAssignDeploymentResourcesOptions body) {
+ // Generated convenience method for beginAssignDeploymentResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginAssignDeploymentResourcesWithModel(projectName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Unassign resources from a project. This disallows deploying new deployments to these resources, and deletes
+ * existing deployments assigned to them.
+ *
+ * @param projectName The name of the project to use.
+ * @param body The info for the deployment resources to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginUnassignDeploymentResources(
+ String projectName, TextAnalysisAuthoringUnassignDeploymentResourcesOptions body) {
+ // Generated convenience method for beginUnassignDeploymentResourcesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginUnassignDeploymentResourcesWithModel(projectName, BinaryData.fromObject(body),
+ requestOptions);
+ }
+
+ /**
+ * Gets the status of an existing assign deployment resources job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing assign deployment resources job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringAssignDeploymentResourcesJobState getAssignDeploymentResourcesStatus(String projectName,
+ String jobId) {
+ // Generated convenience method for getAssignDeploymentResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getAssignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringAssignDeploymentResourcesJobState.class);
+ }
+
+ /**
+ * Gets the status of an existing unassign deployment resources job.
+ *
+ * @param projectName The new project name.
+ * @param jobId The job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an existing unassign deployment resources job.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TextAnalysisAuthoringUnassignDeploymentResourcesJobState
+ getUnassignDeploymentResourcesStatus(String projectName, String jobId) {
+ // Generated convenience method for getUnassignDeploymentResourcesStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUnassignDeploymentResourcesStatusWithResponse(projectName, jobId, requestOptions).getValue()
+ .toObject(TextAnalysisAuthoringUnassignDeploymentResourcesJobState.class);
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ *
+ * @param projectName The new project name.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTrainingJobs(String projectName, Integer top,
+ Integer skip) {
+ // Generated convenience method for listTrainingJobs
+ RequestOptions requestOptions = new RequestOptions();
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ if (skip != null) {
+ requestOptions.addQueryParam("skip", String.valueOf(skip), false);
+ }
+ return serviceClient.listTrainingJobs(projectName, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(TextAnalysisAuthoringTrainingJobState.class));
+ }
+
+ /**
+ * Lists the non-expired training jobs created for a project.
+ *
+ * @param projectName The new project name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TextAnalysisAuthoringTrainingJobState items as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable