All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.translate.AmazonTranslateAsync Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Translate module holds the client classes that are used for communicating with Amazon Translate Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.translate;

import javax.annotation.Generated;

import com.amazonaws.services.translate.model.*;

/**
 * Interface for accessing Amazon Translate asynchronously. Each asynchronous method will return a Java Future object
 * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.translate.AbstractAmazonTranslateAsync} instead. *

*

*

* Provides translation of the input content from the source language to the target language. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonTranslateAsync extends AmazonTranslate { /** *

* Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data * files contain examples that show how you want segments of text to be translated. By adding parallel data, you can * influence the style, tone, and word choice in your translation output. *

* * @param createParallelDataRequest * @return A Java Future containing the result of the CreateParallelData operation returned by the service. * @sample AmazonTranslateAsync.CreateParallelData * @see AWS * API Documentation */ java.util.concurrent.Future createParallelDataAsync(CreateParallelDataRequest createParallelDataRequest); /** *

* Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data * files contain examples that show how you want segments of text to be translated. By adding parallel data, you can * influence the style, tone, and word choice in your translation output. *

* * @param createParallelDataRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the CreateParallelData operation returned by the service. * @sample AmazonTranslateAsyncHandler.CreateParallelData * @see AWS * API Documentation */ java.util.concurrent.Future createParallelDataAsync(CreateParallelDataRequest createParallelDataRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Deletes a parallel data resource in Amazon Translate. *

* * @param deleteParallelDataRequest * @return A Java Future containing the result of the DeleteParallelData operation returned by the service. * @sample AmazonTranslateAsync.DeleteParallelData * @see AWS * API Documentation */ java.util.concurrent.Future deleteParallelDataAsync(DeleteParallelDataRequest deleteParallelDataRequest); /** *

* Deletes a parallel data resource in Amazon Translate. *

* * @param deleteParallelDataRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DeleteParallelData operation returned by the service. * @sample AmazonTranslateAsyncHandler.DeleteParallelData * @see AWS * API Documentation */ java.util.concurrent.Future deleteParallelDataAsync(DeleteParallelDataRequest deleteParallelDataRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* A synchronous action that deletes a custom terminology. *

* * @param deleteTerminologyRequest * @return A Java Future containing the result of the DeleteTerminology operation returned by the service. * @sample AmazonTranslateAsync.DeleteTerminology * @see AWS * API Documentation */ java.util.concurrent.Future deleteTerminologyAsync(DeleteTerminologyRequest deleteTerminologyRequest); /** *

* A synchronous action that deletes a custom terminology. *

* * @param deleteTerminologyRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DeleteTerminology operation returned by the service. * @sample AmazonTranslateAsyncHandler.DeleteTerminology * @see AWS * API Documentation */ java.util.concurrent.Future deleteTerminologyAsync(DeleteTerminologyRequest deleteTerminologyRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and * target languages, input/output S3 buckets, and so on. *

* * @param describeTextTranslationJobRequest * @return A Java Future containing the result of the DescribeTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsync.DescribeTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future describeTextTranslationJobAsync( DescribeTextTranslationJobRequest describeTextTranslationJobRequest); /** *

* Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and * target languages, input/output S3 buckets, and so on. *

* * @param describeTextTranslationJobRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DescribeTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsyncHandler.DescribeTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future describeTextTranslationJobAsync( DescribeTextTranslationJobRequest describeTextTranslationJobRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Provides information about a parallel data resource. *

* * @param getParallelDataRequest * @return A Java Future containing the result of the GetParallelData operation returned by the service. * @sample AmazonTranslateAsync.GetParallelData * @see AWS API * Documentation */ java.util.concurrent.Future getParallelDataAsync(GetParallelDataRequest getParallelDataRequest); /** *

* Provides information about a parallel data resource. *

* * @param getParallelDataRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the GetParallelData operation returned by the service. * @sample AmazonTranslateAsyncHandler.GetParallelData * @see AWS API * Documentation */ java.util.concurrent.Future getParallelDataAsync(GetParallelDataRequest getParallelDataRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Retrieves a custom terminology. *

* * @param getTerminologyRequest * @return A Java Future containing the result of the GetTerminology operation returned by the service. * @sample AmazonTranslateAsync.GetTerminology * @see AWS API * Documentation */ java.util.concurrent.Future getTerminologyAsync(GetTerminologyRequest getTerminologyRequest); /** *

* Retrieves a custom terminology. *

* * @param getTerminologyRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the GetTerminology operation returned by the service. * @sample AmazonTranslateAsyncHandler.GetTerminology * @see AWS API * Documentation */ java.util.concurrent.Future getTerminologyAsync(GetTerminologyRequest getTerminologyRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. * Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen * merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the * existing terminology of the same name. *

*

* If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully * propagate. After that, translations have access to the new terminology. *

* * @param importTerminologyRequest * @return A Java Future containing the result of the ImportTerminology operation returned by the service. * @sample AmazonTranslateAsync.ImportTerminology * @see AWS * API Documentation */ java.util.concurrent.Future importTerminologyAsync(ImportTerminologyRequest importTerminologyRequest); /** *

* Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. * Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen * merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the * existing terminology of the same name. *

*

* If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully * propagate. After that, translations have access to the new terminology. *

* * @param importTerminologyRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ImportTerminology operation returned by the service. * @sample AmazonTranslateAsyncHandler.ImportTerminology * @see AWS * API Documentation */ java.util.concurrent.Future importTerminologyAsync(ImportTerminologyRequest importTerminologyRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports. *

* * @param listLanguagesRequest * @return A Java Future containing the result of the ListLanguages operation returned by the service. * @sample AmazonTranslateAsync.ListLanguages * @see AWS API * Documentation */ java.util.concurrent.Future listLanguagesAsync(ListLanguagesRequest listLanguagesRequest); /** *

* Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports. *

* * @param listLanguagesRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListLanguages operation returned by the service. * @sample AmazonTranslateAsyncHandler.ListLanguages * @see AWS API * Documentation */ java.util.concurrent.Future listLanguagesAsync(ListLanguagesRequest listLanguagesRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Provides a list of your parallel data resources in Amazon Translate. *

* * @param listParallelDataRequest * @return A Java Future containing the result of the ListParallelData operation returned by the service. * @sample AmazonTranslateAsync.ListParallelData * @see AWS API * Documentation */ java.util.concurrent.Future listParallelDataAsync(ListParallelDataRequest listParallelDataRequest); /** *

* Provides a list of your parallel data resources in Amazon Translate. *

* * @param listParallelDataRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListParallelData operation returned by the service. * @sample AmazonTranslateAsyncHandler.ListParallelData * @see AWS API * Documentation */ java.util.concurrent.Future listParallelDataAsync(ListParallelDataRequest listParallelDataRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service. * @sample AmazonTranslateAsync.ListTagsForResource * @see AWS * API Documentation */ java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest listTagsForResourceRequest); /** *

* Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources. *

* * @param listTagsForResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListTagsForResource operation returned by the service. * @sample AmazonTranslateAsyncHandler.ListTagsForResource * @see AWS * API Documentation */ java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest listTagsForResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Provides a list of custom terminologies associated with your account. *

* * @param listTerminologiesRequest * @return A Java Future containing the result of the ListTerminologies operation returned by the service. * @sample AmazonTranslateAsync.ListTerminologies * @see AWS * API Documentation */ java.util.concurrent.Future listTerminologiesAsync(ListTerminologiesRequest listTerminologiesRequest); /** *

* Provides a list of custom terminologies associated with your account. *

* * @param listTerminologiesRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListTerminologies operation returned by the service. * @sample AmazonTranslateAsyncHandler.ListTerminologies * @see AWS * API Documentation */ java.util.concurrent.Future listTerminologiesAsync(ListTerminologiesRequest listTerminologiesRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Gets a list of the batch translation jobs that you have submitted. *

* * @param listTextTranslationJobsRequest * @return A Java Future containing the result of the ListTextTranslationJobs operation returned by the service. * @sample AmazonTranslateAsync.ListTextTranslationJobs * @see AWS API Documentation */ java.util.concurrent.Future listTextTranslationJobsAsync(ListTextTranslationJobsRequest listTextTranslationJobsRequest); /** *

* Gets a list of the batch translation jobs that you have submitted. *

* * @param listTextTranslationJobsRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListTextTranslationJobs operation returned by the service. * @sample AmazonTranslateAsyncHandler.ListTextTranslationJobs * @see AWS API Documentation */ java.util.concurrent.Future listTextTranslationJobsAsync(ListTextTranslationJobsRequest listTextTranslationJobsRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text * across multiple documents at once. For batch translation, you can input documents with different source languages * (specify auto as the source language). You can specify one or more target languages. Batch * translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing. *

*

* Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the * ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation. *

* * @param startTextTranslationJobRequest * @return A Java Future containing the result of the StartTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsync.StartTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future startTextTranslationJobAsync(StartTextTranslationJobRequest startTextTranslationJobRequest); /** *

* Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text * across multiple documents at once. For batch translation, you can input documents with different source languages * (specify auto as the source language). You can specify one or more target languages. Batch * translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing. *

*

* Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the * ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation. *

* * @param startTextTranslationJobRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the StartTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsyncHandler.StartTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future startTextTranslationJobAsync(StartTextTranslationJobRequest startTextTranslationJobRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Stops an asynchronous batch translation job that is in progress. *

*

* If the job's state is IN_PROGRESS, the job will be marked for termination and put into the * STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the * COMPLETED state. Otherwise, the job is put into the STOPPED state. *

*

* Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use * the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation * job's JobId. *

* * @param stopTextTranslationJobRequest * @return A Java Future containing the result of the StopTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsync.StopTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future stopTextTranslationJobAsync(StopTextTranslationJobRequest stopTextTranslationJobRequest); /** *

* Stops an asynchronous batch translation job that is in progress. *

*

* If the job's state is IN_PROGRESS, the job will be marked for termination and put into the * STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the * COMPLETED state. Otherwise, the job is put into the STOPPED state. *

*

* Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use * the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation * job's JobId. *

* * @param stopTextTranslationJobRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the StopTextTranslationJob operation returned by the service. * @sample AmazonTranslateAsyncHandler.StopTextTranslationJob * @see AWS API Documentation */ java.util.concurrent.Future stopTextTranslationJobAsync(StopTextTranslationJobRequest stopTextTranslationJobRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For * more information, see Tagging your * resources. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource operation returned by the service. * @sample AmazonTranslateAsync.TagResource * @see AWS API * Documentation */ java.util.concurrent.Future tagResourceAsync(TagResourceRequest tagResourceRequest); /** *

* Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For * more information, see Tagging your * resources. *

* * @param tagResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the TagResource operation returned by the service. * @sample AmazonTranslateAsyncHandler.TagResource * @see AWS API * Documentation */ java.util.concurrent.Future tagResourceAsync(TagResourceRequest tagResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Translates the input document from the source language to the target language. This synchronous operation * supports text, HTML, or Word documents as the input document. TranslateDocument supports * translations from English to any supported language, and from any supported language to English. Therefore, * specify either the source language code or the target language code as “en” (English). *

*

* If you set the Formality parameter, the request will fail if the target language does not support * formality. For a list of target languages that support formality, see Setting * formality. *

* * @param translateDocumentRequest * @return A Java Future containing the result of the TranslateDocument operation returned by the service. * @sample AmazonTranslateAsync.TranslateDocument * @see AWS * API Documentation */ java.util.concurrent.Future translateDocumentAsync(TranslateDocumentRequest translateDocumentRequest); /** *

* Translates the input document from the source language to the target language. This synchronous operation * supports text, HTML, or Word documents as the input document. TranslateDocument supports * translations from English to any supported language, and from any supported language to English. Therefore, * specify either the source language code or the target language code as “en” (English). *

*

* If you set the Formality parameter, the request will fail if the target language does not support * formality. For a list of target languages that support formality, see Setting * formality. *

* * @param translateDocumentRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the TranslateDocument operation returned by the service. * @sample AmazonTranslateAsyncHandler.TranslateDocument * @see AWS * API Documentation */ java.util.concurrent.Future translateDocumentAsync(TranslateDocumentRequest translateDocumentRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Translates input text from the source language to the target language. For a list of available languages and * language codes, see Supported * languages. *

* * @param translateTextRequest * @return A Java Future containing the result of the TranslateText operation returned by the service. * @sample AmazonTranslateAsync.TranslateText * @see AWS API * Documentation */ java.util.concurrent.Future translateTextAsync(TranslateTextRequest translateTextRequest); /** *

* Translates input text from the source language to the target language. For a list of available languages and * language codes, see Supported * languages. *

* * @param translateTextRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the TranslateText operation returned by the service. * @sample AmazonTranslateAsyncHandler.TranslateText * @see AWS API * Documentation */ java.util.concurrent.Future translateTextAsync(TranslateTextRequest translateTextRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource operation returned by the service. * @sample AmazonTranslateAsync.UntagResource * @see AWS API * Documentation */ java.util.concurrent.Future untagResourceAsync(UntagResourceRequest untagResourceRequest); /** *

* Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources. *

* * @param untagResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the UntagResource operation returned by the service. * @sample AmazonTranslateAsyncHandler.UntagResource * @see AWS API * Documentation */ java.util.concurrent.Future untagResourceAsync(UntagResourceRequest untagResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Updates a previously created parallel data resource by importing a new input file from Amazon S3. *

* * @param updateParallelDataRequest * @return A Java Future containing the result of the UpdateParallelData operation returned by the service. * @sample AmazonTranslateAsync.UpdateParallelData * @see AWS * API Documentation */ java.util.concurrent.Future updateParallelDataAsync(UpdateParallelDataRequest updateParallelDataRequest); /** *

* Updates a previously created parallel data resource by importing a new input file from Amazon S3. *

* * @param updateParallelDataRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the UpdateParallelData operation returned by the service. * @sample AmazonTranslateAsyncHandler.UpdateParallelData * @see AWS * API Documentation */ java.util.concurrent.Future updateParallelDataAsync(UpdateParallelDataRequest updateParallelDataRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy