diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslate.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslate.java index 74917a87f20..2e1eec8855b 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslate.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslate.java @@ -233,18 +233,17 @@ GetTerminologyResult getTerminology(GetTerminologyRequest getTerminologyRequest) /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -265,6 +264,30 @@ GetTerminologyResult getTerminology(GetTerminologyRequest getTerminologyRequest) ImportTerminologyResult importTerminology(ImportTerminologyRequest importTerminologyRequest) throws AmazonClientException, AmazonServiceException; + /** + *

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

+ * + * @param listLanguagesRequest + * @return listLanguagesResult The response from the ListLanguages service + * method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + ListLanguagesResult listLanguages(ListLanguagesRequest listLanguagesRequest) + throws AmazonClientException, AmazonServiceException; + /** *

* Provides a list of your parallel data resources in Amazon Translate. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsync.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsync.java index 286de90c45a..62d4e5336cb 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsync.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsync.java @@ -367,18 +367,17 @@ Future getTerminologyAsync(GetTerminologyRequest getTermin /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -403,18 +402,17 @@ Future importTerminologyAsync( /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -442,6 +440,59 @@ Future importTerminologyAsync( AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; + /** + *

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

+ * + * @param listLanguagesRequest + * @return A Java Future object containing the response from the + * ListLanguages service method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + Future listLanguagesAsync(ListLanguagesRequest listLanguagesRequest) + throws AmazonServiceException, AmazonClientException; + + /** + *

+ * 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 + * life-cycle of the request. Users could provide the + * implementation of the four callback methods in this interface + * to process the operation result or handle the exception. + * @return A Java Future object containing the response from the + * ListLanguages service method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + Future listLanguagesAsync(ListLanguagesRequest listLanguagesRequest, + AsyncHandler asyncHandler) + throws AmazonServiceException, AmazonClientException; + /** *

* Provides a list of your parallel data resources in Amazon Translate. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsyncClient.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsyncClient.java index 8c21ef079bb..aca0bbb5da5 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsyncClient.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateAsyncClient.java @@ -696,18 +696,17 @@ public GetTerminologyResult call() throws Exception { /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -738,18 +737,17 @@ public ImportTerminologyResult call() throws Exception { /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -787,6 +785,77 @@ public ImportTerminologyResult call() throws Exception { }); } + /** + *

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

+ * + * @param listLanguagesRequest + * @return A Java Future object containing the response from the + * ListLanguages service method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + public Future listLanguagesAsync( + final ListLanguagesRequest listLanguagesRequest) throws AmazonServiceException, + AmazonClientException { + return executorService.submit(new Callable() { + public ListLanguagesResult call() throws Exception { + return listLanguages(listLanguagesRequest); + } + }); + } + + /** + *

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

+ * + * @param listLanguagesRequest + * @return A Java Future object containing the response from the + * ListLanguages service method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + public Future listLanguagesAsync( + final ListLanguagesRequest listLanguagesRequest, + final AsyncHandler asyncHandler) + throws AmazonServiceException, AmazonClientException { + return executorService.submit(new Callable() { + public ListLanguagesResult call() throws Exception { + ListLanguagesResult result = null; + try { + result = listLanguages(listLanguagesRequest); + } catch (Exception ex) { + asyncHandler.onError(ex); + throw ex; + } + asyncHandler.onSuccess(listLanguagesRequest, result); + return result; + } + }); + } + /** *

* Provides a list of your parallel data resources in Amazon Translate. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateClient.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateClient.java index 3c9a7bf9e58..4484b00d97b 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateClient.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/AmazonTranslateClient.java @@ -337,6 +337,7 @@ private void init() { jsonErrorUnmarshallers.add(new ServiceUnavailableExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new TextSizeLimitExceededExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new TooManyRequestsExceptionUnmarshaller()); + jsonErrorUnmarshallers.add(new UnsupportedDisplayLanguageCodeExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new UnsupportedLanguagePairExceptionUnmarshaller()); jsonErrorUnmarshallers.add(new JsonErrorUnmarshaller()); @@ -662,18 +663,17 @@ public GetTerminologyResult getTerminology(GetTerminologyRequest getTerminologyR /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge - * strategy is OVERWRITE, and so the imported terminology will overwrite an - * existing terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for - * use in a translation due to cache policies with the DataPlane service - * that performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

* * @param importTerminologyRequest @@ -722,6 +722,56 @@ public ImportTerminologyResult importTerminology( } } + /** + *

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

+ * + * @param listLanguagesRequest + * @return listLanguagesResult The response from the ListLanguages service + * method, as returned by Amazon Translate. + * @throws InvalidParameterValueException + * @throws TooManyRequestsException + * @throws UnsupportedDisplayLanguageCodeException + * @throws InternalServerException + * @throws AmazonClientException If any internal errors are encountered + * inside the client while attempting to make the request or + * handle the response. For example if a network connection is + * not available. + * @throws AmazonServiceException If an error response is returned by Amazon + * Translate indicating either a problem with the data in the + * request, or a server side issue. + */ + public ListLanguagesResult listLanguages(ListLanguagesRequest listLanguagesRequest) + throws AmazonServiceException, AmazonClientException { + ExecutionContext executionContext = createExecutionContext(listLanguagesRequest); + AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); + awsRequestMetrics.startEvent(Field.ClientExecuteTime); + Request request = null; + Response response = null; + try { + awsRequestMetrics.startEvent(Field.RequestMarshallTime); + try { + request = new ListLanguagesRequestMarshaller().marshall(listLanguagesRequest); + // Binds the request metrics to the current request. + request.setAWSRequestMetrics(awsRequestMetrics); + } finally { + awsRequestMetrics.endEvent(Field.RequestMarshallTime); + } + Unmarshaller unmarshaller = new ListLanguagesResultJsonUnmarshaller(); + JsonResponseHandler responseHandler = new JsonResponseHandler( + unmarshaller); + + response = invoke(request, responseHandler, executionContext); + + return response.getAwsResponse(); + } finally { + awsRequestMetrics.endEvent(Field.ClientExecuteTime); + endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC); + } + } + /** *

* Provides a list of your parallel data resources in Amazon Translate. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/DisplayLanguageCode.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/DisplayLanguageCode.java new file mode 100644 index 00000000000..96221a775bd --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/DisplayLanguageCode.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010-2022 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.model; + +import java.util.HashMap; +import java.util.Map; + +/** + * Display Language Code + */ +public enum DisplayLanguageCode { + + De("de"), + En("en"), + Es("es"), + Fr("fr"), + It("it"), + Ja("ja"), + Ko("ko"), + Pt("pt"), + Zh("zh"), + ZhTW("zh-TW"); + + private String value; + + private DisplayLanguageCode(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + + private static final Map enumMap; + static { + enumMap = new HashMap(); + enumMap.put("de", De); + enumMap.put("en", En); + enumMap.put("es", Es); + enumMap.put("fr", Fr); + enumMap.put("it", It); + enumMap.put("ja", Ja); + enumMap.put("ko", Ko); + enumMap.put("pt", Pt); + enumMap.put("zh", Zh); + enumMap.put("zh-TW", ZhTW); + } + + /** + * Use this in place of valueOf. + * + * @param value real value + * @return DisplayLanguageCode corresponding to the value + */ + public static DisplayLanguageCode fromValue(String value) { + if (value == null || value.isEmpty()) { + throw new IllegalArgumentException("Value cannot be null or empty!"); + } else if (enumMap.containsKey(value)) { + return enumMap.get(value); + } else { + throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); + } + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetParallelDataResult.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetParallelDataResult.java index caeccca5420..960ebe34ed4 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetParallelDataResult.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetParallelDataResult.java @@ -29,7 +29,7 @@ public class GetParallelDataResult implements Serializable { *

* The Amazon S3 location of the most recent parallel data input file that * was successfully imported into Amazon Translate. The location is returned - * as a presigned URL that has a 30 minute expiration. + * as a presigned URL that has a 30-minute expiration. *

* *

@@ -56,7 +56,7 @@ public class GetParallelDataResult implements Serializable { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*/ private ParallelDataDataLocation auxiliaryDataLocation; @@ -66,7 +66,7 @@ public class GetParallelDataResult implements Serializable { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to update a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*/ private ParallelDataDataLocation latestUpdateAttemptAuxiliaryDataLocation; @@ -124,7 +124,7 @@ public GetParallelDataResult withParallelDataProperties( *

* The Amazon S3 location of the most recent parallel data input file that * was successfully imported into Amazon Translate. The location is returned - * as a presigned URL that has a 30 minute expiration. + * as a presigned URL that has a 30-minute expiration. *

* *

@@ -147,7 +147,7 @@ public GetParallelDataResult withParallelDataProperties( * @return

* The Amazon S3 location of the most recent parallel data input * file that was successfully imported into Amazon Translate. The - * location is returned as a presigned URL that has a 30 minute + * location is returned as a presigned URL that has a 30-minute * expiration. *

* @@ -176,7 +176,7 @@ public ParallelDataDataLocation getDataLocation() { *

* The Amazon S3 location of the most recent parallel data input file that * was successfully imported into Amazon Translate. The location is returned - * as a presigned URL that has a 30 minute expiration. + * as a presigned URL that has a 30-minute expiration. *

* *

@@ -199,7 +199,7 @@ public ParallelDataDataLocation getDataLocation() { * @param dataLocation

* The Amazon S3 location of the most recent parallel data input * file that was successfully imported into Amazon Translate. The - * location is returned as a presigned URL that has a 30 minute + * location is returned as a presigned URL that has a 30-minute * expiration. *

* @@ -228,7 +228,7 @@ public void setDataLocation(ParallelDataDataLocation dataLocation) { *

* The Amazon S3 location of the most recent parallel data input file that * was successfully imported into Amazon Translate. The location is returned - * as a presigned URL that has a 30 minute expiration. + * as a presigned URL that has a 30-minute expiration. *

* *

@@ -254,7 +254,7 @@ public void setDataLocation(ParallelDataDataLocation dataLocation) { * @param dataLocation

* The Amazon S3 location of the most recent parallel data input * file that was successfully imported into Amazon Translate. The - * location is returned as a presigned URL that has a 30 minute + * location is returned as a presigned URL that has a 30-minute * expiration. *

* @@ -287,7 +287,7 @@ public GetParallelDataResult withDataLocation(ParallelDataDataLocation dataLocat * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @return

@@ -295,7 +295,7 @@ public GetParallelDataResult withDataLocation(ParallelDataDataLocation dataLocat * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a parallel data * resource. The location is returned as a presigned URL to that has - * a 30 minute expiration. + * a 30-minute expiration. *

*/ public ParallelDataDataLocation getAuxiliaryDataLocation() { @@ -307,7 +307,7 @@ public ParallelDataDataLocation getAuxiliaryDataLocation() { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @param auxiliaryDataLocation

@@ -315,7 +315,7 @@ public ParallelDataDataLocation getAuxiliaryDataLocation() { * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a parallel * data resource. The location is returned as a presigned URL to - * that has a 30 minute expiration. + * that has a 30-minute expiration. *

*/ public void setAuxiliaryDataLocation(ParallelDataDataLocation auxiliaryDataLocation) { @@ -327,7 +327,7 @@ public void setAuxiliaryDataLocation(ParallelDataDataLocation auxiliaryDataLocat * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*

* Returns a reference to this object so that method calls can be chained @@ -338,7 +338,7 @@ public void setAuxiliaryDataLocation(ParallelDataDataLocation auxiliaryDataLocat * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a parallel * data resource. The location is returned as a presigned URL to - * that has a 30 minute expiration. + * that has a 30-minute expiration. *

* @return A reference to this updated object so that method calls can be * chained together. @@ -354,7 +354,7 @@ public GetParallelDataResult withAuxiliaryDataLocation( * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to update a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @return

@@ -362,7 +362,7 @@ public GetParallelDataResult withAuxiliaryDataLocation( * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to update a parallel data * resource. The location is returned as a presigned URL to that has - * a 30 minute expiration. + * a 30-minute expiration. *

*/ public ParallelDataDataLocation getLatestUpdateAttemptAuxiliaryDataLocation() { @@ -374,7 +374,7 @@ public ParallelDataDataLocation getLatestUpdateAttemptAuxiliaryDataLocation() { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to update a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @param latestUpdateAttemptAuxiliaryDataLocation

@@ -382,7 +382,7 @@ public ParallelDataDataLocation getLatestUpdateAttemptAuxiliaryDataLocation() { * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to update a parallel * data resource. The location is returned as a presigned URL to - * that has a 30 minute expiration. + * that has a 30-minute expiration. *

*/ public void setLatestUpdateAttemptAuxiliaryDataLocation( @@ -395,7 +395,7 @@ public void setLatestUpdateAttemptAuxiliaryDataLocation( * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to update a parallel data resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*

* Returns a reference to this object so that method calls can be chained @@ -406,7 +406,7 @@ public void setLatestUpdateAttemptAuxiliaryDataLocation( * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to update a parallel * data resource. The location is returned as a presigned URL to - * that has a 30 minute expiration. + * that has a 30-minute expiration. *

* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyRequest.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyRequest.java index 3bae4110803..b5bf8e50934 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyRequest.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyRequest.java @@ -41,15 +41,14 @@ public class GetTerminologyRequest extends AmazonWebServiceRequest implements Se * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Constraints:
@@ -119,15 +118,14 @@ public GetTerminologyRequest withName(String name) { * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Constraints:
@@ -138,13 +136,13 @@ public GetTerminologyRequest withName(String name) { *

*

* If you don't specify this parameter, Amazon Translate returns a - * file that has the same format as the file that was imported to - * create the terminology. + * file with the same format as the file that was imported to create + * the terminology. *

*

* If you specify this parameter when you retrieve a * multi-directional terminology resource, you must specify the same - * format as that of the input file that was imported to create it. + * format as the input file that was imported to create it. * Otherwise, Amazon Translate throws an error. *

* @see TerminologyDataFormat @@ -158,15 +156,14 @@ public String getTerminologyDataFormat() { * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Constraints:
@@ -177,14 +174,14 @@ public String getTerminologyDataFormat() { *

*

* If you don't specify this parameter, Amazon Translate returns - * a file that has the same format as the file that was imported - * to create the terminology. + * a file with the same format as the file that was imported to + * create the terminology. *

*

* If you specify this parameter when you retrieve a * multi-directional terminology resource, you must specify the - * same format as that of the input file that was imported to - * create it. Otherwise, Amazon Translate throws an error. + * same format as the input file that was imported to create it. + * Otherwise, Amazon Translate throws an error. *

* @see TerminologyDataFormat */ @@ -197,15 +194,14 @@ public void setTerminologyDataFormat(String terminologyDataFormat) { * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Returns a reference to this object so that method calls can be chained @@ -219,14 +215,14 @@ public void setTerminologyDataFormat(String terminologyDataFormat) { *

*

* If you don't specify this parameter, Amazon Translate returns - * a file that has the same format as the file that was imported - * to create the terminology. + * a file with the same format as the file that was imported to + * create the terminology. *

*

* If you specify this parameter when you retrieve a * multi-directional terminology resource, you must specify the - * same format as that of the input file that was imported to - * create it. Otherwise, Amazon Translate throws an error. + * same format as the input file that was imported to create it. + * Otherwise, Amazon Translate throws an error. *

* @return A reference to this updated object so that method calls can be * chained together. @@ -242,15 +238,14 @@ public GetTerminologyRequest withTerminologyDataFormat(String terminologyDataFor * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Constraints:
@@ -261,14 +256,14 @@ public GetTerminologyRequest withTerminologyDataFormat(String terminologyDataFor *

*

* If you don't specify this parameter, Amazon Translate returns - * a file that has the same format as the file that was imported - * to create the terminology. + * a file with the same format as the file that was imported to + * create the terminology. *

*

* If you specify this parameter when you retrieve a * multi-directional terminology resource, you must specify the - * same format as that of the input file that was imported to - * create it. Otherwise, Amazon Translate throws an error. + * same format as the input file that was imported to create it. + * Otherwise, Amazon Translate throws an error. *

* @see TerminologyDataFormat */ @@ -281,15 +276,14 @@ public void setTerminologyDataFormat(TerminologyDataFormat terminologyDataFormat * The data format of the custom terminology being retrieved. *

*

- * If you don't specify this parameter, Amazon Translate returns a file that - * has the same format as the file that was imported to create the - * terminology. + * If you don't specify this parameter, Amazon Translate returns a file with + * the same format as the file that was imported to create the terminology. *

*

* If you specify this parameter when you retrieve a multi-directional - * terminology resource, you must specify the same format as that of the - * input file that was imported to create it. Otherwise, Amazon Translate - * throws an error. + * terminology resource, you must specify the same format as the input file + * that was imported to create it. Otherwise, Amazon Translate throws an + * error. *

*

* Returns a reference to this object so that method calls can be chained @@ -303,14 +297,14 @@ public void setTerminologyDataFormat(TerminologyDataFormat terminologyDataFormat *

*

* If you don't specify this parameter, Amazon Translate returns - * a file that has the same format as the file that was imported - * to create the terminology. + * a file with the same format as the file that was imported to + * create the terminology. *

*

* If you specify this parameter when you retrieve a * multi-directional terminology resource, you must specify the - * same format as that of the input file that was imported to - * create it. Otherwise, Amazon Translate throws an error. + * same format as the input file that was imported to create it. + * Otherwise, Amazon Translate throws an error. *

* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyResult.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyResult.java index de547f77e39..4db1eb81cbe 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyResult.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/GetTerminologyResult.java @@ -29,7 +29,7 @@ public class GetTerminologyResult implements Serializable { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration. *

* *

@@ -56,7 +56,7 @@ public class GetTerminologyResult implements Serializable { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a terminology resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*/ private TerminologyDataLocation auxiliaryDataLocation; @@ -111,7 +111,7 @@ public GetTerminologyResult withTerminologyProperties( *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration. *

* *

@@ -134,7 +134,7 @@ public GetTerminologyResult withTerminologyProperties( * @return

* The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon Translate. - * The location is returned as a presigned URL that has a 30 minute + * The location is returned as a presigned URL that has a 30-minute * expiration. *

* @@ -163,7 +163,7 @@ public TerminologyDataLocation getTerminologyDataLocation() { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration. *

* *

@@ -187,7 +187,7 @@ public TerminologyDataLocation getTerminologyDataLocation() { * The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon * Translate. The location is returned as a presigned URL that - * has a 30 minute expiration. + * has a 30-minute expiration. *

* *

@@ -215,7 +215,7 @@ public void setTerminologyDataLocation(TerminologyDataLocation terminologyDataLo *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration. *

* *

@@ -242,7 +242,7 @@ public void setTerminologyDataLocation(TerminologyDataLocation terminologyDataLo * The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon * Translate. The location is returned as a presigned URL that - * has a 30 minute expiration. + * has a 30-minute expiration. *

* *

@@ -275,7 +275,7 @@ public GetTerminologyResult withTerminologyDataLocation( * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a terminology resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @return

@@ -283,7 +283,7 @@ public GetTerminologyResult withTerminologyDataLocation( * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a terminology * resource. The location is returned as a presigned URL to that has - * a 30 minute expiration. + * a 30-minute expiration. *

*/ public TerminologyDataLocation getAuxiliaryDataLocation() { @@ -295,7 +295,7 @@ public TerminologyDataLocation getAuxiliaryDataLocation() { * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a terminology resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* * @param auxiliaryDataLocation

@@ -303,7 +303,7 @@ public TerminologyDataLocation getAuxiliaryDataLocation() { * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a * terminology resource. The location is returned as a presigned - * URL to that has a 30 minute expiration. + * URL to that has a 30-minute expiration. *

*/ public void setAuxiliaryDataLocation(TerminologyDataLocation auxiliaryDataLocation) { @@ -315,7 +315,7 @@ public void setAuxiliaryDataLocation(TerminologyDataLocation auxiliaryDataLocati * The Amazon S3 location of a file that provides any errors or warnings * that were produced by your input file. This file was created when Amazon * Translate attempted to create a terminology resource. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

*

* Returns a reference to this object so that method calls can be chained @@ -326,7 +326,7 @@ public void setAuxiliaryDataLocation(TerminologyDataLocation auxiliaryDataLocati * warnings that were produced by your input file. This file was * created when Amazon Translate attempted to create a * terminology resource. The location is returned as a presigned - * URL to that has a 30 minute expiration. + * URL to that has a 30-minute expiration. *

* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ImportTerminologyRequest.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ImportTerminologyRequest.java index f2eff8aae6d..b8bd6951787 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ImportTerminologyRequest.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ImportTerminologyRequest.java @@ -21,18 +21,16 @@ /** *

- * Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge strategy is - * OVERWRITE, and so the imported terminology will overwrite an existing - * terminology of the same name. + * 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 take up to 10 minutes to fully propagate and be available for use - * in a translation due to cache policies with the DataPlane service that - * performs the translations. + * terminology takes up to 10 minutes to fully propagate. After that, + * translations have access to the new terminology. *

*/ public class ImportTerminologyRequest extends AmazonWebServiceRequest implements Serializable { diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InputDataConfig.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InputDataConfig.java index 323532b4fcc..d8049b18d14 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InputDataConfig.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InputDataConfig.java @@ -25,9 +25,19 @@ public class InputDataConfig implements Serializable { /** *

- * The URI of the AWS S3 folder that contains the input file. The folder - * must be in the same Region as the API endpoint you are calling. + * The URI of the AWS S3 folder that contains the input files. Amazon + * Translate translates all the files in the folder. The folder must be in + * the same Region as the API endpoint you are calling. *

+ * + *

+ * The URI can also point to a single input document, or it can provide the + * prefix for a collection of input documents. For example. if you use the + * URI S3://bucketName/prefix and the prefix is a single file, + * Amazon Translate uses that files as input. If more than one file begins + * with the prefix, Amazon Translate uses all of them as input. + *

+ *
*

* Constraints:
* Length: - 1024
@@ -102,19 +112,40 @@ public class InputDataConfig implements Serializable { /** *

- * The URI of the AWS S3 folder that contains the input file. The folder - * must be in the same Region as the API endpoint you are calling. + * The URI of the AWS S3 folder that contains the input files. Amazon + * Translate translates all the files in the folder. The folder must be in + * the same Region as the API endpoint you are calling. + *

+ * + *

+ * The URI can also point to a single input document, or it can provide the + * prefix for a collection of input documents. For example. if you use the + * URI S3://bucketName/prefix and the prefix is a single file, + * Amazon Translate uses that files as input. If more than one file begins + * with the prefix, Amazon Translate uses all of them as input. *

+ *
*

* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
* * @return

- * The URI of the AWS S3 folder that contains the input file. The + * The URI of the AWS S3 folder that contains the input files. + * Amazon Translate translates all the files in the folder. The * folder must be in the same Region as the API endpoint you are * calling. *

+ * + *

+ * The URI can also point to a single input document, or it can + * provide the prefix for a collection of input documents. For + * example. if you use the URI S3://bucketName/prefix + * and the prefix is a single file, Amazon Translate uses that files + * as input. If more than one file begins with the prefix, Amazon + * Translate uses all of them as input. + *

+ *
*/ public String getS3Uri() { return s3Uri; @@ -122,19 +153,41 @@ public String getS3Uri() { /** *

- * The URI of the AWS S3 folder that contains the input file. The folder - * must be in the same Region as the API endpoint you are calling. + * The URI of the AWS S3 folder that contains the input files. Amazon + * Translate translates all the files in the folder. The folder must be in + * the same Region as the API endpoint you are calling. + *

+ * + *

+ * The URI can also point to a single input document, or it can provide the + * prefix for a collection of input documents. For example. if you use the + * URI S3://bucketName/prefix and the prefix is a single file, + * Amazon Translate uses that files as input. If more than one file begins + * with the prefix, Amazon Translate uses all of them as input. *

+ *
*

* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
* * @param s3Uri

- * The URI of the AWS S3 folder that contains the input file. The + * The URI of the AWS S3 folder that contains the input files. + * Amazon Translate translates all the files in the folder. The * folder must be in the same Region as the API endpoint you are * calling. *

+ * + *

+ * The URI can also point to a single input document, or it can + * provide the prefix for a collection of input documents. For + * example. if you use the URI + * S3://bucketName/prefix and the prefix is a single + * file, Amazon Translate uses that files as input. If more than + * one file begins with the prefix, Amazon Translate uses all of + * them as input. + *

+ *
*/ public void setS3Uri(String s3Uri) { this.s3Uri = s3Uri; @@ -142,9 +195,19 @@ public void setS3Uri(String s3Uri) { /** *

- * The URI of the AWS S3 folder that contains the input file. The folder - * must be in the same Region as the API endpoint you are calling. + * The URI of the AWS S3 folder that contains the input files. Amazon + * Translate translates all the files in the folder. The folder must be in + * the same Region as the API endpoint you are calling. *

+ * + *

+ * The URI can also point to a single input document, or it can provide the + * prefix for a collection of input documents. For example. if you use the + * URI S3://bucketName/prefix and the prefix is a single file, + * Amazon Translate uses that files as input. If more than one file begins + * with the prefix, Amazon Translate uses all of them as input. + *

+ *
*

* Returns a reference to this object so that method calls can be chained * together. @@ -154,10 +217,22 @@ public void setS3Uri(String s3Uri) { * Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
* * @param s3Uri

- * The URI of the AWS S3 folder that contains the input file. The + * The URI of the AWS S3 folder that contains the input files. + * Amazon Translate translates all the files in the folder. The * folder must be in the same Region as the API endpoint you are * calling. *

+ * + *

+ * The URI can also point to a single input document, or it can + * provide the prefix for a collection of input documents. For + * example. if you use the URI + * S3://bucketName/prefix and the prefix is a single + * file, Amazon Translate uses that files as input. If more than + * one file begins with the prefix, Amazon Translate uses all of + * them as input. + *

+ *
* @return A reference to this updated object so that method calls can be * chained together. */ diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidFilterException.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidFilterException.java index 2c47a995ee8..c89efff24a2 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidFilterException.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidFilterException.java @@ -19,7 +19,7 @@ /** *

- * The filter specified for the operation is invalid. Specify a different + * The filter specified for the operation is not valid. Specify a different * filter. *

*/ diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidParameterValueException.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidParameterValueException.java index c29b6ba699b..e640891b4e8 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidParameterValueException.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidParameterValueException.java @@ -19,8 +19,8 @@ /** *

- * The value of the parameter is invalid. Review the value of the parameter you - * are using to correct it, and then retry your operation. + * The value of the parameter is not valid. Review the value of the parameter + * you are using to correct it, and then retry your operation. *

*/ public class InvalidParameterValueException extends AmazonServiceException { diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidRequestException.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidRequestException.java index e21a0d73510..273cffc2aec 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidRequestException.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/InvalidRequestException.java @@ -19,8 +19,8 @@ /** *

- * The request that you made is invalid. Check your request to determine why - * it's invalid and then retry the request. + * The request that you made is not valid. Check your request to determine why + * it's not valid and then retry the request. *

*/ public class InvalidRequestException extends AmazonServiceException { diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/Language.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/Language.java new file mode 100644 index 00000000000..50bf98b9cf2 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/Language.java @@ -0,0 +1,208 @@ +/* + * Copyright 2010-2022 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.model; + +import java.io.Serializable; + +/** + *

+ * A supported language. + *

+ */ +public class Language implements Serializable { + /** + *

+ * Language name of the supported language. + *

+ *

+ * Constraints:
+ * Length: 1 - 256
+ */ + private String languageName; + + /** + *

+ * Language code for the supported language. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ */ + private String languageCode; + + /** + *

+ * Language name of the supported language. + *

+ *

+ * Constraints:
+ * Length: 1 - 256
+ * + * @return

+ * Language name of the supported language. + *

+ */ + public String getLanguageName() { + return languageName; + } + + /** + *

+ * Language name of the supported language. + *

+ *

+ * Constraints:
+ * Length: 1 - 256
+ * + * @param languageName

+ * Language name of the supported language. + *

+ */ + public void setLanguageName(String languageName) { + this.languageName = languageName; + } + + /** + *

+ * Language name of the supported language. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 1 - 256
+ * + * @param languageName

+ * Language name of the supported language. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public Language withLanguageName(String languageName) { + this.languageName = languageName; + return this; + } + + /** + *

+ * Language code for the supported language. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ * + * @return

+ * Language code for the supported language. + *

+ */ + public String getLanguageCode() { + return languageCode; + } + + /** + *

+ * Language code for the supported language. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ * + * @param languageCode

+ * Language code for the supported language. + *

+ */ + public void setLanguageCode(String languageCode) { + this.languageCode = languageCode; + } + + /** + *

+ * Language code for the supported language. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: 2 - 5
+ * + * @param languageCode

+ * Language code for the supported language. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public Language withLanguageCode(String languageCode) { + this.languageCode = languageCode; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getLanguageName() != null) + sb.append("LanguageName: " + getLanguageName() + ","); + if (getLanguageCode() != null) + sb.append("LanguageCode: " + getLanguageCode()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + + ((getLanguageName() == null) ? 0 : getLanguageName().hashCode()); + hashCode = prime * hashCode + + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof Language == false) + return false; + Language other = (Language) obj; + + if (other.getLanguageName() == null ^ this.getLanguageName() == null) + return false; + if (other.getLanguageName() != null + && other.getLanguageName().equals(this.getLanguageName()) == false) + return false; + if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) + return false; + if (other.getLanguageCode() != null + && other.getLanguageCode().equals(this.getLanguageCode()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesRequest.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesRequest.java new file mode 100644 index 00000000000..52ea9f7c145 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesRequest.java @@ -0,0 +1,352 @@ +/* + * Copyright 2010-2022 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.model; + +import java.io.Serializable; + +import com.amazonaws.AmazonWebServiceRequest; + +/** + *

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

+ */ +public class ListLanguagesRequest extends AmazonWebServiceRequest implements Serializable { + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + */ + private String displayLanguageCode; + + /** + *

+ * Include the NextToken value to fetch the next group of supported + * languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ */ + private String nextToken; + + /** + *

+ * The maximum number of results to return in each response. + *

+ *

+ * Constraints:
+ * Range: 1 - 500
+ */ + private Integer maxResults; + + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @return

+ * The language code for the language to use to display the language + * names in the response. The language code is en by + * default. + *

+ * @see DisplayLanguageCode + */ + public String getDisplayLanguageCode() { + return displayLanguageCode; + } + + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code for the language to use to display the + * language names in the response. The language code is + * en by default. + *

+ * @see DisplayLanguageCode + */ + public void setDisplayLanguageCode(String displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode; + } + + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code for the language to use to display the + * language names in the response. The language code is + * en by default. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see DisplayLanguageCode + */ + public ListLanguagesRequest withDisplayLanguageCode(String displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode; + return this; + } + + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code for the language to use to display the + * language names in the response. The language code is + * en by default. + *

+ * @see DisplayLanguageCode + */ + public void setDisplayLanguageCode(DisplayLanguageCode displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode.toString(); + } + + /** + *

+ * The language code for the language to use to display the language names + * in the response. The language code is en by default. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code for the language to use to display the + * language names in the response. The language code is + * en by default. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see DisplayLanguageCode + */ + public ListLanguagesRequest withDisplayLanguageCode(DisplayLanguageCode displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode.toString(); + return this; + } + + /** + *

+ * Include the NextToken value to fetch the next group of supported + * languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @return

+ * Include the NextToken value to fetch the next group of supported + * languages. + *

+ */ + public String getNextToken() { + return nextToken; + } + + /** + *

+ * Include the NextToken value to fetch the next group of supported + * languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @param nextToken

+ * Include the NextToken value to fetch the next group of + * supported languages. + *

+ */ + public void setNextToken(String nextToken) { + this.nextToken = nextToken; + } + + /** + *

+ * Include the NextToken value to fetch the next group of supported + * languages. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @param nextToken

+ * Include the NextToken value to fetch the next group of + * supported languages. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public ListLanguagesRequest withNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + /** + *

+ * The maximum number of results to return in each response. + *

+ *

+ * Constraints:
+ * Range: 1 - 500
+ * + * @return

+ * The maximum number of results to return in each response. + *

+ */ + public Integer getMaxResults() { + return maxResults; + } + + /** + *

+ * The maximum number of results to return in each response. + *

+ *

+ * Constraints:
+ * Range: 1 - 500
+ * + * @param maxResults

+ * The maximum number of results to return in each response. + *

+ */ + public void setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + } + + /** + *

+ * The maximum number of results to return in each response. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Range: 1 - 500
+ * + * @param maxResults

+ * The maximum number of results to return in each response. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public ListLanguagesRequest withMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getDisplayLanguageCode() != null) + sb.append("DisplayLanguageCode: " + getDisplayLanguageCode() + ","); + if (getNextToken() != null) + sb.append("NextToken: " + getNextToken() + ","); + if (getMaxResults() != null) + sb.append("MaxResults: " + getMaxResults()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + + ((getDisplayLanguageCode() == null) ? 0 : getDisplayLanguageCode().hashCode()); + hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); + hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof ListLanguagesRequest == false) + return false; + ListLanguagesRequest other = (ListLanguagesRequest) obj; + + if (other.getDisplayLanguageCode() == null ^ this.getDisplayLanguageCode() == null) + return false; + if (other.getDisplayLanguageCode() != null + && other.getDisplayLanguageCode().equals(this.getDisplayLanguageCode()) == false) + return false; + if (other.getNextToken() == null ^ this.getNextToken() == null) + return false; + if (other.getNextToken() != null + && other.getNextToken().equals(this.getNextToken()) == false) + return false; + if (other.getMaxResults() == null ^ this.getMaxResults() == null) + return false; + if (other.getMaxResults() != null + && other.getMaxResults().equals(this.getMaxResults()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesResult.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesResult.java new file mode 100644 index 00000000000..8d8cf6dd771 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ListLanguagesResult.java @@ -0,0 +1,348 @@ +/* + * Copyright 2010-2022 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.model; + +import java.io.Serializable; + +public class ListLanguagesResult implements Serializable { + /** + *

+ * The list of supported languages. + *

+ */ + private java.util.List languages; + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + */ + private String displayLanguageCode; + + /** + *

+ * If the response does not include all remaining results, use the NextToken + * in the next request to fetch the next group of supported languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ */ + private String nextToken; + + /** + *

+ * The list of supported languages. + *

+ * + * @return

+ * The list of supported languages. + *

+ */ + public java.util.List getLanguages() { + return languages; + } + + /** + *

+ * The list of supported languages. + *

+ * + * @param languages

+ * The list of supported languages. + *

+ */ + public void setLanguages(java.util.Collection languages) { + if (languages == null) { + this.languages = null; + return; + } + + this.languages = new java.util.ArrayList(languages); + } + + /** + *

+ * The list of supported languages. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param languages

+ * The list of supported languages. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public ListLanguagesResult withLanguages(Language... languages) { + if (getLanguages() == null) { + this.languages = new java.util.ArrayList(languages.length); + } + for (Language value : languages) { + this.languages.add(value); + } + return this; + } + + /** + *

+ * The list of supported languages. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + * + * @param languages

+ * The list of supported languages. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public ListLanguagesResult withLanguages(java.util.Collection languages) { + setLanguages(languages); + return this; + } + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @return

+ * The language code passed in with the request. + *

+ * @see DisplayLanguageCode + */ + public String getDisplayLanguageCode() { + return displayLanguageCode; + } + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code passed in with the request. + *

+ * @see DisplayLanguageCode + */ + public void setDisplayLanguageCode(String displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode; + } + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code passed in with the request. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see DisplayLanguageCode + */ + public ListLanguagesResult withDisplayLanguageCode(String displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode; + return this; + } + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code passed in with the request. + *

+ * @see DisplayLanguageCode + */ + public void setDisplayLanguageCode(DisplayLanguageCode displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode.toString(); + } + + /** + *

+ * The language code passed in with the request. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Allowed Values: de, en, es, fr, it, ja, ko, pt, zh, zh-TW + * + * @param displayLanguageCode

+ * The language code passed in with the request. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + * @see DisplayLanguageCode + */ + public ListLanguagesResult withDisplayLanguageCode(DisplayLanguageCode displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode.toString(); + return this; + } + + /** + *

+ * If the response does not include all remaining results, use the NextToken + * in the next request to fetch the next group of supported languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @return

+ * If the response does not include all remaining results, use the + * NextToken in the next request to fetch the next group of + * supported languages. + *

+ */ + public String getNextToken() { + return nextToken; + } + + /** + *

+ * If the response does not include all remaining results, use the NextToken + * in the next request to fetch the next group of supported languages. + *

+ *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @param nextToken

+ * If the response does not include all remaining results, use + * the NextToken in the next request to fetch the next group of + * supported languages. + *

+ */ + public void setNextToken(String nextToken) { + this.nextToken = nextToken; + } + + /** + *

+ * If the response does not include all remaining results, use the NextToken + * in the next request to fetch the next group of supported languages. + *

+ *

+ * Returns a reference to this object so that method calls can be chained + * together. + *

+ * Constraints:
+ * Length: - 8192
+ * Pattern: \p{ASCII}{0,8192}
+ * + * @param nextToken

+ * If the response does not include all remaining results, use + * the NextToken in the next request to fetch the next group of + * supported languages. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public ListLanguagesResult withNextToken(String nextToken) { + this.nextToken = nextToken; + return this; + } + + /** + * Returns a string representation of this object; useful for testing and + * debugging. + * + * @return A string representation of this object. + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{"); + if (getLanguages() != null) + sb.append("Languages: " + getLanguages() + ","); + if (getDisplayLanguageCode() != null) + sb.append("DisplayLanguageCode: " + getDisplayLanguageCode() + ","); + if (getNextToken() != null) + sb.append("NextToken: " + getNextToken()); + sb.append("}"); + return sb.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int hashCode = 1; + + hashCode = prime * hashCode + ((getLanguages() == null) ? 0 : getLanguages().hashCode()); + hashCode = prime * hashCode + + ((getDisplayLanguageCode() == null) ? 0 : getDisplayLanguageCode().hashCode()); + hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); + return hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + + if (obj instanceof ListLanguagesResult == false) + return false; + ListLanguagesResult other = (ListLanguagesResult) obj; + + if (other.getLanguages() == null ^ this.getLanguages() == null) + return false; + if (other.getLanguages() != null + && other.getLanguages().equals(this.getLanguages()) == false) + return false; + if (other.getDisplayLanguageCode() == null ^ this.getDisplayLanguageCode() == null) + return false; + if (other.getDisplayLanguageCode() != null + && other.getDisplayLanguageCode().equals(this.getDisplayLanguageCode()) == false) + return false; + if (other.getNextToken() == null ^ this.getNextToken() == null) + return false; + if (other.getNextToken() != null + && other.getNextToken().equals(this.getNextToken()) == false) + return false; + return true; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ParallelDataDataLocation.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ParallelDataDataLocation.java index 45f83f06992..64c4bd416fa 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ParallelDataDataLocation.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ParallelDataDataLocation.java @@ -38,7 +38,7 @@ public class ParallelDataDataLocation implements Serializable { /** *

* The Amazon S3 location of the parallel data input file. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* *

@@ -127,7 +127,7 @@ public ParallelDataDataLocation withRepositoryType(String repositoryType) { /** *

* The Amazon S3 location of the parallel data input file. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* *

@@ -153,7 +153,7 @@ public ParallelDataDataLocation withRepositoryType(String repositoryType) { * * @return

* The Amazon S3 location of the parallel data input file. The - * location is returned as a presigned URL to that has a 30 minute + * location is returned as a presigned URL to that has a 30-minute * expiration. *

* @@ -181,7 +181,7 @@ public String getLocation() { /** *

* The Amazon S3 location of the parallel data input file. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* *

@@ -207,8 +207,8 @@ public String getLocation() { * * @param location

* The Amazon S3 location of the parallel data input file. The - * location is returned as a presigned URL to that has a 30 - * minute expiration. + * location is returned as a presigned URL to that has a + * 30-minute expiration. *

* *

@@ -235,7 +235,7 @@ public void setLocation(String location) { /** *

* The Amazon S3 location of the parallel data input file. The location is - * returned as a presigned URL to that has a 30 minute expiration. + * returned as a presigned URL to that has a 30-minute expiration. *

* *

@@ -264,8 +264,8 @@ public void setLocation(String location) { * * @param location

* The Amazon S3 location of the parallel data input file. The - * location is returned as a presigned URL to that has a 30 - * minute expiration. + * location is returned as a presigned URL to that has a + * 30-minute expiration. *

* *

diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ServiceUnavailableException.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ServiceUnavailableException.java index 20f9c1fe63a..41d19abbc22 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ServiceUnavailableException.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/ServiceUnavailableException.java @@ -19,8 +19,8 @@ /** *

- * The Amazon Translate service is temporarily unavailable. Please wait a bit - * and then retry your request. + * The Amazon Translate service is temporarily unavailable. Wait a bit and then + * retry your request. *

*/ public class ServiceUnavailableException extends AmazonServiceException { diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/StartTextTranslationJobRequest.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/StartTextTranslationJobRequest.java index 24b981103b8..8a1b923c576 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/StartTextTranslationJobRequest.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/StartTextTranslationJobRequest.java @@ -52,7 +52,7 @@ public class StartTextTranslationJobRequest extends AmazonWebServiceRequest impl /** *

- * Specifies the format and S3 location of the input documents for the + * Specifies the format and location of the input documents for the * translation job. *

*/ @@ -149,7 +149,7 @@ public class StartTextTranslationJobRequest extends AmazonWebServiceRequest impl /** *

- * A unique identifier for the request. This token is auto-generated when + * A unique identifier for the request. This token is generated for you when * using the Amazon Translate SDK. *

*

@@ -162,7 +162,8 @@ public class StartTextTranslationJobRequest extends AmazonWebServiceRequest impl /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * mask profane words and phrases. StartTextTranslationJob does + * not support the formality setting. *

*/ private TranslationSettings settings; @@ -226,13 +227,13 @@ public StartTextTranslationJobRequest withJobName(String jobName) { /** *

- * Specifies the format and S3 location of the input documents for the + * Specifies the format and location of the input documents for the * translation job. *

* * @return

- * Specifies the format and S3 location of the input documents for - * the translation job. + * Specifies the format and location of the input documents for the + * translation job. *

*/ public InputDataConfig getInputDataConfig() { @@ -241,13 +242,13 @@ public InputDataConfig getInputDataConfig() { /** *

- * Specifies the format and S3 location of the input documents for the + * Specifies the format and location of the input documents for the * translation job. *

* * @param inputDataConfig

- * Specifies the format and S3 location of the input documents - * for the translation job. + * Specifies the format and location of the input documents for + * the translation job. *

*/ public void setInputDataConfig(InputDataConfig inputDataConfig) { @@ -256,7 +257,7 @@ public void setInputDataConfig(InputDataConfig inputDataConfig) { /** *

- * Specifies the format and S3 location of the input documents for the + * Specifies the format and location of the input documents for the * translation job. *

*

@@ -264,8 +265,8 @@ public void setInputDataConfig(InputDataConfig inputDataConfig) { * together. * * @param inputDataConfig

- * Specifies the format and S3 location of the input documents - * for the translation job. + * Specifies the format and location of the input documents for + * the translation job. *

* @return A reference to this updated object so that method calls can be * chained together. @@ -980,7 +981,7 @@ public StartTextTranslationJobRequest withParallelDataNames( /** *

- * A unique identifier for the request. This token is auto-generated when + * A unique identifier for the request. This token is generated for you when * using the Amazon Translate SDK. *

*

@@ -989,8 +990,8 @@ public StartTextTranslationJobRequest withParallelDataNames( * Pattern: ^[a-zA-Z0-9-]+$
* * @return

- * A unique identifier for the request. This token is auto-generated - * when using the Amazon Translate SDK. + * A unique identifier for the request. This token is generated for + * you when using the Amazon Translate SDK. *

*/ public String getClientToken() { @@ -999,7 +1000,7 @@ public String getClientToken() { /** *

- * A unique identifier for the request. This token is auto-generated when + * A unique identifier for the request. This token is generated for you when * using the Amazon Translate SDK. *

*

@@ -1008,8 +1009,8 @@ public String getClientToken() { * Pattern: ^[a-zA-Z0-9-]+$
* * @param clientToken

- * A unique identifier for the request. This token is - * auto-generated when using the Amazon Translate SDK. + * A unique identifier for the request. This token is generated + * for you when using the Amazon Translate SDK. *

*/ public void setClientToken(String clientToken) { @@ -1018,7 +1019,7 @@ public void setClientToken(String clientToken) { /** *

- * A unique identifier for the request. This token is auto-generated when + * A unique identifier for the request. This token is generated for you when * using the Amazon Translate SDK. *

*

@@ -1030,8 +1031,8 @@ public void setClientToken(String clientToken) { * Pattern: ^[a-zA-Z0-9-]+$
* * @param clientToken

- * A unique identifier for the request. This token is - * auto-generated when using the Amazon Translate SDK. + * A unique identifier for the request. This token is generated + * for you when using the Amazon Translate SDK. *

* @return A reference to this updated object so that method calls can be * chained together. @@ -1044,12 +1045,15 @@ public StartTextTranslationJobRequest withClientToken(String clientToken) { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * mask profane words and phrases. StartTextTranslationJob does + * not support the formality setting. *

* * @return

* Settings to configure your translation output, including the * option to mask profane words and phrases. + * StartTextTranslationJob does not support the + * formality setting. *

*/ public TranslationSettings getSettings() { @@ -1059,12 +1063,15 @@ public TranslationSettings getSettings() { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * mask profane words and phrases. StartTextTranslationJob does + * not support the formality setting. *

* * @param settings

* Settings to configure your translation output, including the * option to mask profane words and phrases. + * StartTextTranslationJob does not support the + * formality setting. *

*/ public void setSettings(TranslationSettings settings) { @@ -1074,7 +1081,8 @@ public void setSettings(TranslationSettings settings) { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * mask profane words and phrases. StartTextTranslationJob does + * not support the formality setting. *

*

* Returns a reference to this object so that method calls can be chained @@ -1083,6 +1091,8 @@ public void setSettings(TranslationSettings settings) { * @param settings

* Settings to configure your translation output, including the * option to mask profane words and phrases. + * StartTextTranslationJob does not support the + * formality setting. *

* @return A reference to this updated object so that method calls can be * chained together. diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyData.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyData.java index d45f46cafb3..978ef241dc0 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyData.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyData.java @@ -19,7 +19,10 @@ /** *

- * The data associated with the custom terminology. + * The data associated with the custom terminology. For information about the + * custom terminology file, see Creating a Custom Terminology. *

*/ public class TerminologyData implements Serializable { @@ -66,9 +69,8 @@ public class TerminologyData implements Serializable { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -272,9 +274,8 @@ public TerminologyData withFormat(TerminologyDataFormat format) { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -308,9 +309,8 @@ public TerminologyData withFormat(TerminologyDataFormat format) { * language or a target language. A single multi-directional * terminology resource can be used for jobs that translate * different language pairs. For example, if the terminology - * contains terms in English and Spanish, then it can be used for - * jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * contains English and Spanish terms, it can be used for jobs that + * translate English to Spanish and Spanish to English. *

* * @@ -345,9 +345,8 @@ public String getDirectionality() { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -381,9 +380,8 @@ public String getDirectionality() { * language or a target language. A single multi-directional * terminology resource can be used for jobs that translate * different language pairs. For example, if the terminology - * contains terms in English and Spanish, then it can be used for - * jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * contains English and Spanish terms, it can be used for jobs + * that translate English to Spanish and Spanish to English. *

* * @@ -418,9 +416,8 @@ public void setDirectionality(String directionality) { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -457,9 +454,8 @@ public void setDirectionality(String directionality) { * language or a target language. A single multi-directional * terminology resource can be used for jobs that translate * different language pairs. For example, if the terminology - * contains terms in English and Spanish, then it can be used for - * jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * contains English and Spanish terms, it can be used for jobs + * that translate English to Spanish and Spanish to English. *

* * @@ -497,9 +493,8 @@ public TerminologyData withDirectionality(String directionality) { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -533,9 +528,8 @@ public TerminologyData withDirectionality(String directionality) { * language or a target language. A single multi-directional * terminology resource can be used for jobs that translate * different language pairs. For example, if the terminology - * contains terms in English and Spanish, then it can be used for - * jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * contains English and Spanish terms, it can be used for jobs + * that translate English to Spanish and Spanish to English. *

* * @@ -570,9 +564,8 @@ public void setDirectionality(Directionality directionality) { * Any language in the terminology resource can be the source language or a * target language. A single multi-directional terminology resource can be * used for jobs that translate different language pairs. For example, if - * the terminology contains terms in English and Spanish, then it can be - * used for jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * the terminology contains English and Spanish terms, it can be used for + * jobs that translate English to Spanish and Spanish to English. *

* * @@ -609,9 +602,8 @@ public void setDirectionality(Directionality directionality) { * language or a target language. A single multi-directional * terminology resource can be used for jobs that translate * different language pairs. For example, if the terminology - * contains terms in English and Spanish, then it can be used for - * jobs that translate English to Spanish and jobs that translate - * Spanish to English. + * contains English and Spanish terms, it can be used for jobs + * that translate English to Spanish and Spanish to English. *

* * diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyDataLocation.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyDataLocation.java index a39ac52fdc3..9478b3a7fcb 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyDataLocation.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TerminologyDataLocation.java @@ -38,7 +38,7 @@ public class TerminologyDataLocation implements Serializable { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration . *

* *

@@ -125,7 +125,7 @@ public TerminologyDataLocation withRepositoryType(String repositoryType) { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration . *

* *

@@ -152,8 +152,8 @@ public TerminologyDataLocation withRepositoryType(String repositoryType) { * @return

* The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon Translate. - * The location is returned as a presigned URL that has a 30 minute - * expiration. + * The location is returned as a presigned URL that has a 30-minute + * expiration . *

* *

@@ -181,7 +181,7 @@ public String getLocation() { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration . *

* *

@@ -209,7 +209,7 @@ public String getLocation() { * The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon * Translate. The location is returned as a presigned URL that - * has a 30 minute expiration. + * has a 30-minute expiration . *

* *

@@ -237,7 +237,7 @@ public void setLocation(String location) { *

* The Amazon S3 location of the most recent custom terminology input file * that was successfully imported into Amazon Translate. The location is - * returned as a presigned URL that has a 30 minute expiration. + * returned as a presigned URL that has a 30-minute expiration . *

* *

@@ -268,7 +268,7 @@ public void setLocation(String location) { * The Amazon S3 location of the most recent custom terminology * input file that was successfully imported into Amazon * Translate. The location is returned as a presigned URL that - * has a 30 minute expiration. + * has a 30-minute expiration . *

* *

diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslateTextRequest.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslateTextRequest.java index ea268d90b09..255809a3335 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslateTextRequest.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslateTextRequest.java @@ -63,6 +63,14 @@ public class TranslateTextRequest extends AmazonWebServiceRequest implements Ser * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports Amazon + * Comprehend. Otherwise, the request returns an error indicating that + * autodetect is not supported. + *

+ *
*

* Constraints:
* Length: 2 - 5
@@ -83,7 +91,8 @@ public class TranslateTextRequest extends AmazonWebServiceRequest implements Ser /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * set the formality level of the output text and the option to mask profane + * words and phrases. *

*/ private TranslationSettings settings; @@ -269,6 +278,14 @@ public TranslateTextRequest withTerminologyNames(java.util.Collection te * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports Amazon + * Comprehend. Otherwise, the request returns an error indicating that + * autodetect is not supported. + *

+ *
*

* Constraints:
* Length: 2 - 5
@@ -286,6 +303,14 @@ public TranslateTextRequest withTerminologyNames(java.util.Collection te * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports + * Amazon Comprehend. Otherwise, the request returns an error + * indicating that autodetect is not supported. + *

+ *
*/ public String getSourceLanguageCode() { return sourceLanguageCode; @@ -305,6 +330,14 @@ public String getSourceLanguageCode() { * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports Amazon + * Comprehend. Otherwise, the request returns an error indicating that + * autodetect is not supported. + *

+ *
*

* Constraints:
* Length: 2 - 5
@@ -322,6 +355,14 @@ public String getSourceLanguageCode() { * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports + * Amazon Comprehend. Otherwise, the request returns an error + * indicating that autodetect is not supported. + *

+ *
*/ public void setSourceLanguageCode(String sourceLanguageCode) { this.sourceLanguageCode = sourceLanguageCode; @@ -341,6 +382,14 @@ public void setSourceLanguageCode(String sourceLanguageCode) { * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports Amazon + * Comprehend. Otherwise, the request returns an error indicating that + * autodetect is not supported. + *

+ *
*

* Returns a reference to this object so that method calls can be chained * together. @@ -361,6 +410,14 @@ public void setSourceLanguageCode(String sourceLanguageCode) { * "https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html" * >Amazon Comprehend to determine the source language. *

+ * + *

+ * If you specify auto, you must send the + * TranslateText request in a region that supports + * Amazon Comprehend. Otherwise, the request returns an error + * indicating that autodetect is not supported. + *

+ *
* @return A reference to this updated object so that method calls can be * chained together. */ @@ -434,11 +491,13 @@ public TranslateTextRequest withTargetLanguageCode(String targetLanguageCode) { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * set the formality level of the output text and the option to mask profane + * words and phrases. *

* * @return

* Settings to configure your translation output, including the + * option to set the formality level of the output text and the * option to mask profane words and phrases. *

*/ @@ -449,11 +508,13 @@ public TranslationSettings getSettings() { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * set the formality level of the output text and the option to mask profane + * words and phrases. *

* * @param settings

* Settings to configure your translation output, including the + * option to set the formality level of the output text and the * option to mask profane words and phrases. *

*/ @@ -464,7 +525,8 @@ public void setSettings(TranslationSettings settings) { /** *

* Settings to configure your translation output, including the option to - * mask profane words and phrases. + * set the formality level of the output text and the option to mask profane + * words and phrases. *

*

* Returns a reference to this object so that method calls can be chained @@ -472,6 +534,7 @@ public void setSettings(TranslationSettings settings) { * * @param settings

* Settings to configure your translation output, including the + * option to set the formality level of the output text and the * option to mask profane words and phrases. *

* @return A reference to this updated object so that method calls can be diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslationSettings.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslationSettings.java index 81ad764986b..a49ba85d5ea 100644 --- a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslationSettings.java +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/TranslationSettings.java @@ -24,7 +24,27 @@ */ public class TranslationSettings implements Serializable { /** - * The new value for the formality property for this object. + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Constraints:
* Allowed Values: FORMAL, INFORMAL @@ -42,9 +62,9 @@ public class TranslationSettings implements Serializable { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -55,12 +75,54 @@ public class TranslationSettings implements Serializable { private String profanity; /** - * Returns the value of the formality property for this object. + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Constraints:
* Allowed Values: FORMAL, INFORMAL * - * @return The value of the formality property for this object. + * @return

+ * You can optionally specify the desired level of formality for + * real-time translations to supported target languages. The + * formality setting controls the level of formal language usage + * (also known as register) in the translation output. You can set the value + * to informal or formal. If you don't specify a value for + * formality, or if the target language doesn't support formality, + * the translation will ignore the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. + * If you provide a value for formality, the + * StartTextTranslationJob API throws an exception + * (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate + * Developer Guide. + *

* @see Formality */ public String getFormality() { @@ -68,13 +130,54 @@ public String getFormality() { } /** - * Sets the value of formality + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Constraints:
* Allowed Values: FORMAL, INFORMAL * - * @param formality The new value for the formality property for this - * object. + * @param formality

+ * You can optionally specify the desired level of formality for + * real-time translations to supported target languages. The + * formality setting controls the level of formal language usage + * (also known as register) in the translation output. You can set the + * value to informal or formal. If you don't specify a value for + * formality, or if the target language doesn't support + * formality, the translation will ignore the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support + * formality. If you provide a value for formality, the + * StartTextTranslationJob API throws an exception + * (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon + * Translate Developer Guide. + *

* @see Formality */ public void setFormality(String formality) { @@ -82,7 +185,27 @@ public void setFormality(String formality) { } /** - * Sets the value of the formality property for this object. + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Returns a reference to this object so that method calls can be chained * together. @@ -90,8 +213,29 @@ public void setFormality(String formality) { * Constraints:
* Allowed Values: FORMAL, INFORMAL * - * @param formality The new value for the formality property for this - * object. + * @param formality

+ * You can optionally specify the desired level of formality for + * real-time translations to supported target languages. The + * formality setting controls the level of formal language usage + * (also known as register) in the translation output. You can set the + * value to informal or formal. If you don't specify a value for + * formality, or if the target language doesn't support + * formality, the translation will ignore the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support + * formality. If you provide a value for formality, the + * StartTextTranslationJob API throws an exception + * (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon + * Translate Developer Guide. + *

* @return A reference to this updated object so that method calls can be * chained together. * @see Formality @@ -102,13 +246,54 @@ public TranslationSettings withFormality(String formality) { } /** - * Sets the value of formality + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Constraints:
* Allowed Values: FORMAL, INFORMAL * - * @param formality The new value for the formality property for this - * object. + * @param formality

+ * You can optionally specify the desired level of formality for + * real-time translations to supported target languages. The + * formality setting controls the level of formal language usage + * (also known as register) in the translation output. You can set the + * value to informal or formal. If you don't specify a value for + * formality, or if the target language doesn't support + * formality, the translation will ignore the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support + * formality. If you provide a value for formality, the + * StartTextTranslationJob API throws an exception + * (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon + * Translate Developer Guide. + *

* @see Formality */ public void setFormality(Formality formality) { @@ -116,7 +301,27 @@ public void setFormality(Formality formality) { } /** - * Sets the value of the formality property for this object. + *

+ * You can optionally specify the desired level of formality for real-time + * translations to supported target languages. The formality setting + * controls the level of formal language usage (also known as register) in the translation output. You can set the value to + * informal or formal. If you don't specify a value for formality, or if the + * target language doesn't support formality, the translation will ignore + * the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support formality. If you + * provide a value for formality, the StartTextTranslationJob + * API throws an exception (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon Translate Developer + * Guide. + *

*

* Returns a reference to this object so that method calls can be chained * together. @@ -124,8 +329,29 @@ public void setFormality(Formality formality) { * Constraints:
* Allowed Values: FORMAL, INFORMAL * - * @param formality The new value for the formality property for this - * object. + * @param formality

+ * You can optionally specify the desired level of formality for + * real-time translations to supported target languages. The + * formality setting controls the level of formal language usage + * (also known as register) in the translation output. You can set the + * value to informal or formal. If you don't specify a value for + * formality, or if the target language doesn't support + * formality, the translation will ignore the formality setting. + *

+ *

+ * Note that asynchronous translation jobs don't support + * formality. If you provide a value for formality, the + * StartTextTranslationJob API throws an exception + * (InvalidRequestException). + *

+ *

+ * For target languages that support formality, see Supported Languages and Language Codes in the Amazon + * Translate Developer Guide. + *

* @return A reference to this updated object so that method calls can be * chained together. * @see Formality @@ -146,9 +372,9 @@ public TranslationSettings withFormality(Formality formality) { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -167,10 +393,10 @@ public TranslationSettings withFormality(Formality formality) { * number of words. *

*

- * Amazon Translate does not detect profanity in all of its - * supported languages. For languages that support profanity - * detection, see Supported Languages and Language Codes in the Amazon Translate * Developer Guide. *

@@ -191,9 +417,9 @@ public String getProfanity() { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -212,10 +438,10 @@ public String getProfanity() { * of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its + * Amazon Translate doesn't detect profanity in all of its * supported languages. For languages that support profanity * detection, see Supported Languages and Language Codes in the Amazon * Translate Developer Guide. *

@@ -236,9 +462,9 @@ public void setProfanity(String profanity) { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -260,10 +486,10 @@ public void setProfanity(String profanity) { * of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its + * Amazon Translate doesn't detect profanity in all of its * supported languages. For languages that support profanity * detection, see Supported Languages and Language Codes in the Amazon * Translate Developer Guide. *

@@ -287,9 +513,9 @@ public TranslationSettings withProfanity(String profanity) { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -308,10 +534,10 @@ public TranslationSettings withProfanity(String profanity) { * of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its + * Amazon Translate doesn't detect profanity in all of its * supported languages. For languages that support profanity * detection, see Supported Languages and Language Codes in the Amazon * Translate Developer Guide. *

@@ -332,9 +558,9 @@ public void setProfanity(Profanity profanity) { * profane word or phrase, regardless of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its supported - * languages. For languages that support profanity detection, see Supported Languages and Language Codes in the Amazon Translate Developer * Guide. *

@@ -356,10 +582,10 @@ public void setProfanity(Profanity profanity) { * of the length or number of words. *

*

- * Amazon Translate does not detect profanity in all of its + * Amazon Translate doesn't detect profanity in all of its * supported languages. For languages that support profanity * detection, see Supported Languages and Language Codes in the Amazon * Translate Developer Guide. *

diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/UnsupportedDisplayLanguageCodeException.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/UnsupportedDisplayLanguageCodeException.java new file mode 100644 index 00000000000..d23f418b646 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/UnsupportedDisplayLanguageCodeException.java @@ -0,0 +1,79 @@ +/* + * Copyright 2010-2022 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.model; + +import com.amazonaws.AmazonServiceException; + +/** + *

+ * Requested display language code is not supported. + *

+ */ +public class UnsupportedDisplayLanguageCodeException extends AmazonServiceException { + private static final long serialVersionUID = 1L; + + /** + *

+ * Language code passed in with the request. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ */ + private String displayLanguageCode; + + /** + * Constructs a new UnsupportedDisplayLanguageCodeException with the + * specified error message. + * + * @param message Describes the error encountered. + */ + public UnsupportedDisplayLanguageCodeException(String message) { + super(message); + } + + /** + *

+ * Language code passed in with the request. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ * + * @return

+ * Language code passed in with the request. + *

+ */ + public String getDisplayLanguageCode() { + return displayLanguageCode; + } + + /** + *

+ * Language code passed in with the request. + *

+ *

+ * Constraints:
+ * Length: 2 - 5
+ * + * @param displayLanguageCode

+ * Language code passed in with the request. + *

+ */ + public void setDisplayLanguageCode(String displayLanguageCode) { + this.displayLanguageCode = displayLanguageCode; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonMarshaller.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonMarshaller.java new file mode 100644 index 00000000000..1070af9048f --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonMarshaller.java @@ -0,0 +1,49 @@ +/* + * Copyright 2010-2022 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.model.transform; + +import com.amazonaws.services.translate.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO Language + */ +class LanguageJsonMarshaller { + + public void marshall(Language language, AwsJsonWriter jsonWriter) throws Exception { + jsonWriter.beginObject(); + if (language.getLanguageName() != null) { + String languageName = language.getLanguageName(); + jsonWriter.name("LanguageName"); + jsonWriter.value(languageName); + } + if (language.getLanguageCode() != null) { + String languageCode = language.getLanguageCode(); + jsonWriter.name("LanguageCode"); + jsonWriter.value(languageCode); + } + jsonWriter.endObject(); + } + + private static LanguageJsonMarshaller instance; + + public static LanguageJsonMarshaller getInstance() { + if (instance == null) + instance = new LanguageJsonMarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonUnmarshaller.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonUnmarshaller.java new file mode 100644 index 00000000000..5207d31708a --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/LanguageJsonUnmarshaller.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010-2022 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.model.transform; + +import com.amazonaws.services.translate.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for POJO Language + */ +class LanguageJsonUnmarshaller implements Unmarshaller { + + public Language unmarshall(JsonUnmarshallerContext context) throws Exception { + AwsJsonReader reader = context.getReader(); + if (!reader.isContainer()) { + reader.skipValue(); + return null; + } + Language language = new Language(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("LanguageName")) { + language.setLanguageName(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("LanguageCode")) { + language.setLanguageCode(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + return language; + } + + private static LanguageJsonUnmarshaller instance; + + public static LanguageJsonUnmarshaller getInstance() { + if (instance == null) + instance = new LanguageJsonUnmarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesRequestMarshaller.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesRequestMarshaller.java new file mode 100644 index 00000000000..87069c8dad0 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesRequestMarshaller.java @@ -0,0 +1,97 @@ +/* + * Copyright 2010-2022 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.model.transform; + +import static com.amazonaws.util.StringUtils.UTF8; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.OutputStreamWriter; +import java.io.StringWriter; +import java.io.Writer; + +import android.text.TextUtils; + +import com.amazonaws.AmazonClientException; +import com.amazonaws.Request; +import com.amazonaws.DefaultRequest; +import com.amazonaws.http.HttpMethodName; +import com.amazonaws.services.translate.model.*; +import com.amazonaws.transform.Marshaller; +import com.amazonaws.util.BinaryUtils; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.StringUtils; +import com.amazonaws.util.StringInputStream; +import com.amazonaws.util.json.AwsJsonWriter; +import com.amazonaws.util.json.JsonUtils; + +/** + * JSON request marshaller for ListLanguagesRequest + */ +public class ListLanguagesRequestMarshaller implements + Marshaller, ListLanguagesRequest> { + + public Request marshall(ListLanguagesRequest listLanguagesRequest) { + if (listLanguagesRequest == null) { + throw new AmazonClientException( + "Invalid argument passed to marshall(ListLanguagesRequest)"); + } + + Request request = new DefaultRequest( + listLanguagesRequest, "AmazonTranslate"); + String target = "AWSShineFrontendService_20170701.ListLanguages"; + request.addHeader("X-Amz-Target", target); + request.setHttpMethod(HttpMethodName.POST); + + String uriResourcePath = "/"; + request.setResourcePath(uriResourcePath); + try { + StringWriter stringWriter = new StringWriter(); + AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter); + jsonWriter.beginObject(); + + if (listLanguagesRequest.getDisplayLanguageCode() != null) { + String displayLanguageCode = listLanguagesRequest.getDisplayLanguageCode(); + jsonWriter.name("DisplayLanguageCode"); + jsonWriter.value(displayLanguageCode); + } + if (listLanguagesRequest.getNextToken() != null) { + String nextToken = listLanguagesRequest.getNextToken(); + jsonWriter.name("NextToken"); + jsonWriter.value(nextToken); + } + if (listLanguagesRequest.getMaxResults() != null) { + Integer maxResults = listLanguagesRequest.getMaxResults(); + jsonWriter.name("MaxResults"); + jsonWriter.value(maxResults); + } + + jsonWriter.endObject(); + jsonWriter.close(); + String snippet = stringWriter.toString(); + byte[] content = snippet.getBytes(UTF8); + request.setContent(new StringInputStream(snippet)); + request.addHeader("Content-Length", Integer.toString(content.length)); + } catch (Throwable t) { + throw new AmazonClientException( + "Unable to marshall request to JSON: " + t.getMessage(), t); + } + if (!request.getHeaders().containsKey("Content-Type")) { + request.addHeader("Content-Type", "application/x-amz-json-1.1"); + } + + return request; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesResultJsonUnmarshaller.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesResultJsonUnmarshaller.java new file mode 100644 index 00000000000..bb10f638543 --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/ListLanguagesResultJsonUnmarshaller.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010-2022 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.model.transform; + +import com.amazonaws.services.translate.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for response ListLanguagesResult + */ +public class ListLanguagesResultJsonUnmarshaller implements + Unmarshaller { + + public ListLanguagesResult unmarshall(JsonUnmarshallerContext context) throws Exception { + ListLanguagesResult listLanguagesResult = new ListLanguagesResult(); + + AwsJsonReader reader = context.getReader(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("Languages")) { + listLanguagesResult.setLanguages(new ListUnmarshaller( + LanguageJsonUnmarshaller.getInstance() + ) + .unmarshall(context)); + } else if (name.equals("DisplayLanguageCode")) { + listLanguagesResult.setDisplayLanguageCode(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("NextToken")) { + listLanguagesResult.setNextToken(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + + return listLanguagesResult; + } + + private static ListLanguagesResultJsonUnmarshaller instance; + + public static ListLanguagesResultJsonUnmarshaller getInstance() { + if (instance == null) + instance = new ListLanguagesResultJsonUnmarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/UnsupportedDisplayLanguageCodeExceptionUnmarshaller.java b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/UnsupportedDisplayLanguageCodeExceptionUnmarshaller.java new file mode 100644 index 00000000000..1f0f98b630b --- /dev/null +++ b/aws-android-sdk-translate/src/main/java/com/amazonaws/services/translate/model/transform/UnsupportedDisplayLanguageCodeExceptionUnmarshaller.java @@ -0,0 +1,44 @@ +/* + * Copyright 2010-2022 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.model.transform; + +import com.amazonaws.AmazonServiceException; +import com.amazonaws.http.JsonErrorResponseHandler.JsonErrorResponse; +import com.amazonaws.transform.JsonErrorUnmarshaller; +import com.amazonaws.services.translate.model.UnsupportedDisplayLanguageCodeException; + +public class UnsupportedDisplayLanguageCodeExceptionUnmarshaller extends JsonErrorUnmarshaller { + + public UnsupportedDisplayLanguageCodeExceptionUnmarshaller() { + super(UnsupportedDisplayLanguageCodeException.class); + } + + @Override + public boolean match(JsonErrorResponse error) throws Exception { + return error.getErrorCode().equals("UnsupportedDisplayLanguageCodeException"); + } + + @Override + public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception { + + UnsupportedDisplayLanguageCodeException e = (UnsupportedDisplayLanguageCodeException) super + .unmarshall(error); + e.setErrorCode("UnsupportedDisplayLanguageCodeException"); + e.setDisplayLanguageCode(String.valueOf(error.get("DisplayLanguageCode"))); + + return e; + } +}