Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate Update models to latest #3444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,11 @@ TagResourceResult tagResource(TagResourceRequest tagResourceRequest)
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,14 +945,11 @@ Future<TagResourceResult> tagResourceAsync(TagResourceRequest tagResourceRequest
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down Expand Up @@ -988,14 +985,11 @@ Future<TranslateDocumentResult> translateDocumentAsync(
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1420,14 +1420,11 @@ public TagResourceResult call() throws Exception {
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down Expand Up @@ -1469,14 +1466,11 @@ public TranslateDocumentResult call() throws Exception {
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1168,14 +1168,11 @@ public TagResourceResult tagResource(TagResourceRequest tagResourceRequest)
/**
* <p>
* Translates the input document from the source language to the target
* language. This synchronous operation supports plain text or HTML for the
* input document. <code>TranslateDocument</code> supports translations from
* English to any supported language, and from any supported language to
* English. Therefore, specify either the source language code or the target
* language code as “en” (English).
* </p>
* <p>
* <code>TranslateDocument</code> does not support language auto-detection.
* language. This synchronous operation supports text, HTML, or Word
* documents as the input document. <code>TranslateDocument</code> supports
* translations from English to any supported language, and from any
* supported language to English. Therefore, specify either the source
* language code or the target language code as “en” (English).
* </p>
* <p>
* If you set the <code>Formality</code> parameter, the request will fail if
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright 2010-2023 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;

/**
* Brevity
*/
public enum Brevity {

ON("ON");

private String value;

private Brevity(String value) {
this.value = value;
}

@Override
public String toString() {
return value;
}

private static final Map<String, Brevity> enumMap;
static {
enumMap = new HashMap<String, Brevity>();
enumMap.put("ON", ON);
}

/**
* Use this in place of valueOf.
*
* @param value real value
* @return Brevity corresponding to the value
*/
public static Brevity fromValue(String value) {
if (value == null || value.isEmpty()) {
throw new IllegalArgumentException("Value cannot be null or empty!");
} else if (enumMap.containsKey(value)) {
return enumMap.get(value);
} else {
throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,20 @@ public class Document implements Serializable {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon Translate
* translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text. Amazon
* Translate translates every character in the content.
* <code>text/plain</code> - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* </p>
* </li>
* <li>
* <p>
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand Down Expand Up @@ -145,14 +151,20 @@ public Document withContent(java.nio.ByteBuffer content) {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon Translate
* translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* </p>
* </li>
* <li>
* <p>
* <code>text/plain</code> - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text. Amazon
* Translate translates every character in the content.
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand All @@ -168,14 +180,20 @@ public Document withContent(java.nio.ByteBuffer content) {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML content.
* Amazon Translate translates only the text in the HTML element.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text. Amazon
* Translate translates every character in the content.
* <code>text/plain</code> - The input data consists of unformatted
* text. Amazon Translate translates every character in the content.
* </p>
* </li>
* <li>
* <p>
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand All @@ -192,14 +210,20 @@ public String getContentType() {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon Translate
* translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* </p>
* </li>
* <li>
* <p>
* <code>text/plain</code> - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text. Amazon
* Translate translates every character in the content.
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand All @@ -215,14 +239,22 @@ public String getContentType() {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML
* content. Amazon Translate translates only the text in the HTML
* element.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* <code>text/plain</code> - The input data consists of
* unformatted text. Amazon Translate translates every character
* in the content.
* </p>
* </li>
* <li>
* <p>
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand All @@ -239,14 +271,20 @@ public void setContentType(String contentType) {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon Translate
* translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* </p>
* </li>
* <li>
* <p>
* <code>text/plain</code> - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text. Amazon
* Translate translates every character in the content.
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand All @@ -265,14 +303,22 @@ public void setContentType(String contentType) {
* <ul>
* <li>
* <p>
* text/html - The input data consists of HTML content. Amazon
* Translate translates only the text in the HTML element.
* <code>text/html</code> - The input data consists of HTML
* content. Amazon Translate translates only the text in the HTML
* element.
* </p>
* </li>
* <li>
* <p>
* <code>text/plain</code> - The input data consists of
* unformatted text. Amazon Translate translates every character
* in the content.
* </p>
* </li>
* <li>
* <p>
* text/plain - The input data consists of unformatted text.
* Amazon Translate translates every character in the content.
* <code>application/vnd.openxmlformats-officedocument.wordprocessingml.document</code>
* - The input data consists of a Word document (.docx).
* </p>
* </li>
* </ul>
Expand Down
Loading