public final class BatchTranslateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 implements BatchTranslateDocumentRequestOrBuilder
The BatchTranslateDocument request.Protobuf type
google.cloud.translation.v3.BatchTranslateDocumentRequest| Modifier and Type | Class and Description |
|---|---|
static class |
BatchTranslateDocumentRequest.Builder
The BatchTranslateDocument request.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
FORMAT_CONVERSIONS_FIELD_NUMBER |
static int |
GLOSSARIES_FIELD_NUMBER |
static int |
INPUT_CONFIGS_FIELD_NUMBER |
static int |
MODELS_FIELD_NUMBER |
static int |
OUTPUT_CONFIG_FIELD_NUMBER |
static int |
PARENT_FIELD_NUMBER |
static int |
SOURCE_LANGUAGE_CODE_FIELD_NUMBER |
static int |
TARGET_LANGUAGE_CODES_FIELD_NUMBER |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int PARENT_FIELD_NUMBER
public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
public static final int TARGET_LANGUAGE_CODES_FIELD_NUMBER
public static final int INPUT_CONFIGS_FIELD_NUMBER
public static final int OUTPUT_CONFIG_FIELD_NUMBER
public static final int MODELS_FIELD_NUMBER
public static final int GLOSSARIES_FIELD_NUMBER
public static final int FORMAT_CONVERSIONS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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) = { ... }
getParent in interface BatchTranslateDocumentRequestOrBuilderpublic 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) = { ... }
getParentBytes in interface BatchTranslateDocumentRequestOrBuilderpublic String getSourceLanguageCode()
Required. The BCP-47 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];getSourceLanguageCode in interface BatchTranslateDocumentRequestOrBuilderpublic com.google.protobuf.ByteString getSourceLanguageCodeBytes()
Required. The BCP-47 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];getSourceLanguageCodeBytes in interface BatchTranslateDocumentRequestOrBuilderpublic com.google.protobuf.ProtocolStringList getTargetLanguageCodesList()
Required. The BCP-47 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];
getTargetLanguageCodesList in interface BatchTranslateDocumentRequestOrBuilderpublic int getTargetLanguageCodesCount()
Required. The BCP-47 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];
getTargetLanguageCodesCount in interface BatchTranslateDocumentRequestOrBuilderpublic String getTargetLanguageCodes(int index)
Required. The BCP-47 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];
getTargetLanguageCodes in interface BatchTranslateDocumentRequestOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index)
Required. The BCP-47 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];
getTargetLanguageCodesBytes in interface BatchTranslateDocumentRequestOrBuilderindex - The index of the value to return.public 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];
getInputConfigsList in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getInputConfigsOrBuilderList in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getInputConfigsCount in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getInputConfigs in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getInputConfigsOrBuilder in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
hasOutputConfig in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getOutputConfig in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getOutputConfigOrBuilder in interface BatchTranslateDocumentRequestOrBuilderpublic int getModelsCount()
BatchTranslateDocumentRequestOrBuilder
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];getModelsCount in interface BatchTranslateDocumentRequestOrBuilderpublic 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];containsModels in interface BatchTranslateDocumentRequestOrBuilder@Deprecated public Map<String,String> getModels()
getModelsMap() instead.getModels in interface BatchTranslateDocumentRequestOrBuilderpublic 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];getModelsMap in interface BatchTranslateDocumentRequestOrBuilderpublic 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];getModelsOrDefault in interface BatchTranslateDocumentRequestOrBuilderpublic 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];getModelsOrThrow in interface BatchTranslateDocumentRequestOrBuilderpublic int getGlossariesCount()
BatchTranslateDocumentRequestOrBuilderOptional. 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];
getGlossariesCount in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
containsGlossaries in interface BatchTranslateDocumentRequestOrBuilder@Deprecated public Map<String,TranslateTextGlossaryConfig> getGlossaries()
getGlossariesMap() instead.getGlossaries in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getGlossariesMap in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getGlossariesOrDefault in interface BatchTranslateDocumentRequestOrBuilderpublic 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];
getGlossariesOrThrow in interface BatchTranslateDocumentRequestOrBuilderpublic int getFormatConversionsCount()
BatchTranslateDocumentRequestOrBuilderOptional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's 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];
getFormatConversionsCount in interface BatchTranslateDocumentRequestOrBuilderpublic boolean containsFormatConversions(String key)
Optional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's 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 in interface BatchTranslateDocumentRequestOrBuilder@Deprecated public Map<String,String> getFormatConversions()
getFormatConversionsMap() instead.getFormatConversions in interface BatchTranslateDocumentRequestOrBuilderpublic Map<String,String> getFormatConversionsMap()
Optional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's 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];
getFormatConversionsMap in interface BatchTranslateDocumentRequestOrBuilderpublic String getFormatConversionsOrDefault(String key, String defaultValue)
Optional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's 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 in interface BatchTranslateDocumentRequestOrBuilderpublic String getFormatConversionsOrThrow(String key)
Optional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's 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 in interface BatchTranslateDocumentRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static BatchTranslateDocumentRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static BatchTranslateDocumentRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static BatchTranslateDocumentRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static BatchTranslateDocumentRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static BatchTranslateDocumentRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static BatchTranslateDocumentRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static BatchTranslateDocumentRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic BatchTranslateDocumentRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static BatchTranslateDocumentRequest.Builder newBuilder()
public static BatchTranslateDocumentRequest.Builder newBuilder(BatchTranslateDocumentRequest prototype)
public BatchTranslateDocumentRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected BatchTranslateDocumentRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static BatchTranslateDocumentRequest getDefaultInstance()
public static com.google.protobuf.Parser<BatchTranslateDocumentRequest> parser()
public com.google.protobuf.Parser<BatchTranslateDocumentRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public BatchTranslateDocumentRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 Google LLC. All rights reserved.