Package com.google.cloud.translate.v3
Interface BatchTranslateDocumentRequestOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
BatchTranslateDocumentRequest,BatchTranslateDocumentRequest.Builder
@Generated
public interface BatchTranslateDocumentRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanOptional.booleancontainsGlossaries(String key) Optional.booleancontainsModels(String key) Optional.Optional.com.google.protobuf.ByteStringOptional.booleanOptional.booleanOptional.Deprecated.intOptional.Optional.getFormatConversionsOrDefault(String key, String defaultValue) Optional.Optional.Deprecated.intOptional.Optional.getGlossariesOrDefault(String key, TranslateTextGlossaryConfig defaultValue) Optional.Optional.getInputConfigs(int index) Required.intRequired.Required.getInputConfigsOrBuilder(int index) Required.List<? extends BatchDocumentInputConfigOrBuilder>Required.Deprecated.intOptional.Optional.getModelsOrDefault(String key, String defaultValue) Optional.getModelsOrThrow(String key) Optional.Required.Required.Required.com.google.protobuf.ByteStringRequired.Required.com.google.protobuf.ByteStringRequired.getTargetLanguageCodes(int index) Required.com.google.protobuf.ByteStringgetTargetLanguageCodesBytes(int index) Required.intRequired.Required.booleanRequired.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getParent
String getParent()Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- The parent.
-
getParentBytes
com.google.protobuf.ByteString getParentBytes()Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- The bytes for parent.
-
getSourceLanguageCode
String getSourceLanguageCode()Required. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
com.google.protobuf.ByteString getSourceLanguageCodeBytes()Required. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- The bytes for sourceLanguageCode.
-
getTargetLanguageCodesList
Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- A list containing the targetLanguageCodes.
-
getTargetLanguageCodesCount
int getTargetLanguageCodesCount()Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- The count of targetLanguageCodes.
-
getTargetLanguageCodes
Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
index- The index of the element to return.- Returns:
- The targetLanguageCodes at the given index.
-
getTargetLanguageCodesBytes
com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the targetLanguageCodes at the given index.
-
getInputConfigsList
List<BatchDocumentInputConfig> getInputConfigsList()Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; -
getInputConfigs
Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; -
getInputConfigsCount
int getInputConfigsCount()Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; -
getInputConfigsOrBuilderList
List<? extends BatchDocumentInputConfigOrBuilder> getInputConfigsOrBuilderList()Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; -
getInputConfigsOrBuilder
Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; -
hasOutputConfig
boolean hasOutputConfig()Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.
.google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];- Returns:
- Whether the outputConfig field is set.
-
getOutputConfig
BatchDocumentOutputConfig getOutputConfig()Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.
.google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];- Returns:
- The outputConfig.
-
getOutputConfigOrBuilder
BatchDocumentOutputConfigOrBuilder getOutputConfigOrBuilder()Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs.
.google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; -
getModelsCount
int getModelsCount()Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL]; -
containsModels
Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getModels
Deprecated.UsegetModelsMap()instead. -
getModelsMap
Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getModelsOrDefault
Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getModelsOrThrow
Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossariesCount
int getGlossariesCount()Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; -
containsGlossaries
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossaries
Deprecated.UsegetGlossariesMap()instead. -
getGlossariesMap
Map<String,TranslateTextGlossaryConfig> getGlossariesMap()Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossariesOrDefault
TranslateTextGlossaryConfig getGlossariesOrDefault(String key, TranslateTextGlossaryConfig defaultValue) Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossariesOrThrow
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getFormatConversionsCount
int getFormatConversionsCount()Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
map<string, string> format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; -
containsFormatConversions
Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
map<string, string> format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getFormatConversions
Deprecated.UsegetFormatConversionsMap()instead. -
getFormatConversionsMap
Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
map<string, string> format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getFormatConversionsOrDefault
Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
map<string, string> format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getFormatConversionsOrThrow
Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.
map<string, string> format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getCustomizedAttribution
String getCustomizedAttribution()Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos
string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The customizedAttribution.
-
getCustomizedAttributionBytes
com.google.protobuf.ByteString getCustomizedAttributionBytes()Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos
string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The bytes for customizedAttribution.
-
getEnableShadowRemovalNativePdf
boolean getEnableShadowRemovalNativePdf()Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false
bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The enableShadowRemovalNativePdf.
-
getEnableRotationCorrection
boolean getEnableRotationCorrection()Optional. If true, enable auto rotation correction in DVS.
bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- The enableRotationCorrection.
-