com.amazonaws.services.translate.AmazonTranslateAsync Maven / Gradle / Ivy
Show all versions of aws-java-sdk-translate Show documentation
/*
* Copyright 2013-2018 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 between English and one of six languages, or between one of the six languages and English.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AmazonTranslateAsync extends AmazonTranslate {
/**
*
* Translates input text from the source language to the target language. You can translate between English (en) and
* one of the following languages, or between one of the following languages and English.
*
*
* -
*
* Arabic (ar)
*
*
* -
*
* Chinese (Simplified) (zh)
*
*
* -
*
* French (fr)
*
*
* -
*
* German (de)
*
*
* -
*
* Portuguese (pt)
*
*
* -
*
* Spanish (es)
*
*
*
*
* To have Amazon Translate determine the source language of your text, you can specify auto
in the
* SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
* Comprehend to determine the source language.
*
*
* @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. You can translate between English (en) and
* one of the following languages, or between one of the following languages and English.
*
*
* -
*
* Arabic (ar)
*
*
* -
*
* Chinese (Simplified) (zh)
*
*
* -
*
* French (fr)
*
*
* -
*
* German (de)
*
*
* -
*
* Portuguese (pt)
*
*
* -
*
* Spanish (es)
*
*
*
*
* To have Amazon Translate determine the source language of your text, you can specify auto
in the
* SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon
* Comprehend to determine the source language.
*
*
* @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);
}