Interface BatchTranslateDocumentRequestOrBuilder (2.36.0)

public interface BatchTranslateDocumentRequestOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsFormatConversions(String key)

public abstract boolean containsFormatConversions(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsGlossaries(String key)

public abstract boolean containsGlossaries(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsModels(String key)

public abstract boolean containsModels(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCustomizedAttribution()

public abstract 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
TypeDescription
String

The customizedAttribution.

getCustomizedAttributionBytes()

public abstract 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
TypeDescription
ByteString

The bytes for customizedAttribution.

getEnableRotationCorrection()

public abstract boolean getEnableRotationCorrection()

Optional. If true, enable auto rotation correction in DVS.

bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The enableRotationCorrection.

getEnableShadowRemovalNativePdf()

public abstract 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
TypeDescription
boolean

The enableShadowRemovalNativePdf.

getFormatConversions() (deprecated)

public abstract Map<String,String> getFormatConversions()
Returns
TypeDescription
Map<String,String>

getFormatConversionsCount()

public abstract 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];

Returns
TypeDescription
int

getFormatConversionsMap()

public abstract Map<String,String> 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];

Returns
TypeDescription
Map<String,String>

getFormatConversionsOrDefault(String key, String defaultValue)

public abstract String getFormatConversionsOrDefault(String key, String defaultValue)

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];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getFormatConversionsOrThrow(String key)

public abstract String getFormatConversionsOrThrow(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getGlossaries() (deprecated)

public abstract Map<String,TranslateTextGlossaryConfig> getGlossaries()

Use #getGlossariesMap() instead.

Returns
TypeDescription
Map<String,TranslateTextGlossaryConfig>

getGlossariesCount()

public abstract 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];

Returns
TypeDescription
int

getGlossariesMap()

public abstract 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];

Returns
TypeDescription
Map<String,TranslateTextGlossaryConfig>

getGlossariesOrDefault(String key, TranslateTextGlossaryConfig defaultValue)

public abstract 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];

Parameters
NameDescription
keyString
defaultValueTranslateTextGlossaryConfig
Returns
TypeDescription
TranslateTextGlossaryConfig

getGlossariesOrThrow(String key)

public abstract TranslateTextGlossaryConfig getGlossariesOrThrow(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
TranslateTextGlossaryConfig

getInputConfigs(int index)

public abstract BatchDocumentInputConfig getInputConfigs(int index)

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];

Parameter
NameDescription
indexint
Returns
TypeDescription
BatchDocumentInputConfig

getInputConfigsCount()

public abstract 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];

Returns
TypeDescription
int

getInputConfigsList()

public abstract 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];

Returns
TypeDescription
List<BatchDocumentInputConfig>

getInputConfigsOrBuilder(int index)

public abstract BatchDocumentInputConfigOrBuilder getInputConfigsOrBuilder(int index)

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];

Parameter
NameDescription
indexint
Returns
TypeDescription
BatchDocumentInputConfigOrBuilder

getInputConfigsOrBuilderList()

public abstract 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];

Returns
TypeDescription
List<? extends com.google.cloud.translate.v3.BatchDocumentInputConfigOrBuilder>

getModels() (deprecated)

public abstract Map<String,String> getModels()

Use #getModelsMap() instead.

Returns
TypeDescription
Map<String,String>

getModelsCount()

public abstract 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];

Returns
TypeDescription
int

getModelsMap()

public abstract Map<String,String> 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];

Returns
TypeDescription
Map<String,String>

getModelsOrDefault(String key, String defaultValue)

public abstract String getModelsOrDefault(String key, String defaultValue)

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];

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getModelsOrThrow(String key)

public abstract String getModelsOrThrow(String key)

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];

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getOutputConfig()

public abstract 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
TypeDescription
BatchDocumentOutputConfig

The outputConfig.

getOutputConfigOrBuilder()

public abstract 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];

Returns
TypeDescription
BatchDocumentOutputConfigOrBuilder

getParent()

public abstract 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
TypeDescription
String

The parent.

getParentBytes()

public abstract 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
TypeDescription
ByteString

The bytes for parent.

getSourceLanguageCode()

public abstract 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.

string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public abstract 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.

string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for sourceLanguageCode.

getTargetLanguageCodes(int index)

public abstract String getTargetLanguageCodes(int index)

Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here.

repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The targetLanguageCodes at the given index.

getTargetLanguageCodesBytes(int index)

public abstract 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.

repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the targetLanguageCodes at the given index.

getTargetLanguageCodesCount()

public abstract int getTargetLanguageCodesCount()

Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here.

repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The count of targetLanguageCodes.

getTargetLanguageCodesList()

public abstract List<String> getTargetLanguageCodesList()

Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here.

repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<String>

A list containing the targetLanguageCodes.

hasOutputConfig()

public abstract 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
TypeDescription
boolean

Whether the outputConfig field is set.