public interface TranslateTextRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
String |
getContents(int index)
Required.
|
com.google.protobuf.ByteString |
getContentsBytes(int index)
Required.
|
int |
getContentsCount()
Required.
|
List<String> |
getContentsList()
Required.
|
TranslateTextGlossaryConfig |
getGlossaryConfig()
Optional.
|
TranslateTextGlossaryConfigOrBuilder |
getGlossaryConfigOrBuilder()
Optional.
|
String |
getMimeType()
Optional.
|
com.google.protobuf.ByteString |
getMimeTypeBytes()
Optional.
|
String |
getModel()
Optional.
|
com.google.protobuf.ByteString |
getModelBytes()
Optional.
|
String |
getParent()
Required.
|
com.google.protobuf.ByteString |
getParentBytes()
Required.
|
String |
getSourceLanguageCode()
Optional.
|
com.google.protobuf.ByteString |
getSourceLanguageCodeBytes()
Optional.
|
String |
getTargetLanguageCode()
Required.
|
com.google.protobuf.ByteString |
getTargetLanguageCodeBytes()
Required.
|
boolean |
hasGlossaryConfig()
Optional.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofList<String> getContentsList()
Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. Use BatchTranslateText for larger text.
repeated string contents = 1;int getContentsCount()
Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. Use BatchTranslateText for larger text.
repeated string contents = 1;String getContents(int index)
Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. Use BatchTranslateText for larger text.
repeated string contents = 1;com.google.protobuf.ByteString getContentsBytes(int index)
Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. Use BatchTranslateText for larger text.
repeated string contents = 1;String getMimeType()
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3;com.google.protobuf.ByteString getMimeTypeBytes()
Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".
string mime_type = 3;String getSourceLanguageCode()
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4;com.google.protobuf.ByteString getSourceLanguageCodeBytes()
Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
string source_language_code = 4;String getTargetLanguageCode()
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5;com.google.protobuf.ByteString getTargetLanguageCodeBytes()
Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.
string target_language_code = 5;String getParent()
Required. Location to make a regional or global call.
Format: `projects/{project-id}/locations/{location-id}`.
For global calls, use `projects/{project-id}/locations/global`.
Models and glossaries must be within the same region (have same
location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 8;com.google.protobuf.ByteString getParentBytes()
Required. Location to make a regional or global call.
Format: `projects/{project-id}/locations/{location-id}`.
For global calls, use `projects/{project-id}/locations/global`.
Models and glossaries must be within the same region (have same
location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 8;String getModel()
Optional. The `model` type requested for this translation.
The format depends on model type:
- AutoML Translation models:
`projects/{project-id}/locations/{location-id}/models/{model-id}`
- General (built-in) models:
`projects/{project-id}/locations/{location-id}/models/general/nmt`,
`projects/{project-id}/locations/{location-id}/models/general/base`
For global (non-regionalized) requests, use `location-id` `global`.
For example,
`projects/{project-id}/locations/global/models/general/nmt`.
If missing, the system decides which google base model to use.
string model = 6;com.google.protobuf.ByteString getModelBytes()
Optional. The `model` type requested for this translation.
The format depends on model type:
- AutoML Translation models:
`projects/{project-id}/locations/{location-id}/models/{model-id}`
- General (built-in) models:
`projects/{project-id}/locations/{location-id}/models/general/nmt`,
`projects/{project-id}/locations/{location-id}/models/general/base`
For global (non-regionalized) requests, use `location-id` `global`.
For example,
`projects/{project-id}/locations/global/models/general/nmt`.
If missing, the system decides which google base model to use.
string model = 6;boolean hasGlossaryConfig()
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7;TranslateTextGlossaryConfig getGlossaryConfig()
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7;TranslateTextGlossaryConfigOrBuilder getGlossaryConfigOrBuilder()
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7;Copyright © 2019 Google LLC. All rights reserved.