public final class BatchTranslateDocumentRequest extends GeneratedMessageV3 implements BatchTranslateDocumentRequestOrBuilder
The BatchTranslateDocument request.Protobuf type
google.cloud.translation.v3beta1.BatchTranslateDocumentRequest
Modifier and Type | Class and Description |
---|---|
static class |
BatchTranslateDocumentRequest.Builder
The BatchTranslateDocument request.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
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 |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
index
- The index of the element to return.public 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 BatchTranslateDocumentRequestOrBuilder
index
- 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.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsList
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsOrBuilderList
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsCount
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
getInputConfigs
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsOrBuilder
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
hasOutputConfig
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
getOutputConfig
in interface BatchTranslateDocumentRequestOrBuilder
public 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.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
getOutputConfigOrBuilder
in interface BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public int getGlossariesCount()
BatchTranslateDocumentRequestOrBuilder
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesCount
in interface BatchTranslateDocumentRequestOrBuilder
public boolean containsGlossaries(String key)
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
containsGlossaries
in interface BatchTranslateDocumentRequestOrBuilder
@Deprecated public Map<String,TranslateTextGlossaryConfig> getGlossaries()
getGlossariesMap()
instead.getGlossaries
in interface BatchTranslateDocumentRequestOrBuilder
public Map<String,TranslateTextGlossaryConfig> getGlossariesMap()
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesMap
in interface BatchTranslateDocumentRequestOrBuilder
public TranslateTextGlossaryConfig getGlossariesOrDefault(String key, TranslateTextGlossaryConfig defaultValue)
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesOrDefault
in interface BatchTranslateDocumentRequestOrBuilder
public TranslateTextGlossaryConfig getGlossariesOrThrow(String key)
Optional. Glossaries to be applied. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesOrThrow
in interface BatchTranslateDocumentRequestOrBuilder
public int getFormatConversionsCount()
BatchTranslateDocumentRequestOrBuilder
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];
getFormatConversionsCount
in interface BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public 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 BatchTranslateDocumentRequestOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static BatchTranslateDocumentRequest parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateDocumentRequest parseFrom(InputStream input) throws IOException
IOException
public static BatchTranslateDocumentRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static BatchTranslateDocumentRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static BatchTranslateDocumentRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static BatchTranslateDocumentRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static BatchTranslateDocumentRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public BatchTranslateDocumentRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static BatchTranslateDocumentRequest.Builder newBuilder()
public static BatchTranslateDocumentRequest.Builder newBuilder(BatchTranslateDocumentRequest prototype)
public BatchTranslateDocumentRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected BatchTranslateDocumentRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static BatchTranslateDocumentRequest getDefaultInstance()
public static Parser<BatchTranslateDocumentRequest> parser()
public Parser<BatchTranslateDocumentRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public BatchTranslateDocumentRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.