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
- * 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.
*
- * 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.
*
+ * Provides a list of languages (RFC-5646 codes and names) that Amazon
+ * Translate supports.
+ *
+ * Provides a list of languages (RFC-5646 codes and names) that Amazon
+ * Translate supports.
+ *
* 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.
*
- * 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.
*
+ * Provides a list of languages (RFC-5646 codes and names) that Amazon
+ * Translate supports.
+ *
+ * Provides a list of languages (RFC-5646 codes and names) that Amazon
+ * Translate supports.
+ *
* 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.
*
+ * Provides a list of languages (RFC-5646 codes and names) that Amazon
+ * Translate supports.
+ *
* 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
* 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.
*
* 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.
*
* 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.
*
* 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.
*
@@ -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. *
** 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.
+ *
- * 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.
+ *
- * 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.
+ *
- * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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+ * 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+ * The list of supported languages. + *
+ * + * @param languages+ * The list of supported languages. + *
+ */ + public void setLanguages(java.util.Collection+ * 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+ * 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+ * 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. *
** 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.
*
- * 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.
*
* Settings to configure your translation output, including the
* option to mask profane words and phrases.
+ * StartTextTranslationJob
does not support the
+ * formality setting.
*
* 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.
*
* Settings to configure your translation output, including the
* option to mask profane words and phrases.
+ * StartTextTranslationJob
does not support the
+ * formality setting.
*
* 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.
*
- * 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
+ * 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
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
* 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