public final class BatchTranslateTextRequest extends GeneratedMessageV3 implements BatchTranslateTextRequestOrBuilder
The batch translation request.Protobuf type
google.cloud.translation.v3beta1.BatchTranslateTextRequest
Modifier and Type | Class and Description |
---|---|
static class |
BatchTranslateTextRequest.Builder
The batch translation 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 |
GLOSSARIES_FIELD_NUMBER |
static int |
INPUT_CONFIGS_FIELD_NUMBER |
static int |
LABELS_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 MODELS_FIELD_NUMBER
public static final int INPUT_CONFIGS_FIELD_NUMBER
public static final int OUTPUT_CONFIG_FIELD_NUMBER
public static final int GLOSSARIES_FIELD_NUMBER
public static final int LABELS_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 call. Must refer to a caller's project. 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 BatchTranslateTextRequestOrBuilder
public ByteString getParentBytes()
Required. Location to make a call. Must refer to a caller's project. 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 BatchTranslateTextRequestOrBuilder
public String getSourceLanguageCode()
Required. Source language code.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
getSourceLanguageCode
in interface BatchTranslateTextRequestOrBuilder
public ByteString getSourceLanguageCodeBytes()
Required. Source language code.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
getSourceLanguageCodeBytes
in interface BatchTranslateTextRequestOrBuilder
public ProtocolStringList getTargetLanguageCodesList()
Required. Specify up to 10 language codes here.
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
getTargetLanguageCodesList
in interface BatchTranslateTextRequestOrBuilder
public int getTargetLanguageCodesCount()
Required. Specify up to 10 language codes here.
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
getTargetLanguageCodesCount
in interface BatchTranslateTextRequestOrBuilder
public String getTargetLanguageCodes(int index)
Required. Specify up to 10 language codes here.
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
getTargetLanguageCodes
in interface BatchTranslateTextRequestOrBuilder
index
- The index of the element to return.public ByteString getTargetLanguageCodesBytes(int index)
Required. Specify up to 10 language codes here.
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
getTargetLanguageCodesBytes
in interface BatchTranslateTextRequestOrBuilder
index
- The index of the value to return.public int getModelsCount()
BatchTranslateTextRequestOrBuilder
Optional. The models to use for translation. Map's key is target language code. Map's value is 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 = 4 [(.google.api.field_behavior) = OPTIONAL];
getModelsCount
in interface BatchTranslateTextRequestOrBuilder
public boolean containsModels(String key)
Optional. The models to use for translation. Map's key is target language code. Map's value is 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 = 4 [(.google.api.field_behavior) = OPTIONAL];
containsModels
in interface BatchTranslateTextRequestOrBuilder
@Deprecated public Map<String,String> getModels()
getModelsMap()
instead.getModels
in interface BatchTranslateTextRequestOrBuilder
public Map<String,String> getModelsMap()
Optional. The models to use for translation. Map's key is target language code. Map's value is 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 = 4 [(.google.api.field_behavior) = OPTIONAL];
getModelsMap
in interface BatchTranslateTextRequestOrBuilder
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 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 = 4 [(.google.api.field_behavior) = OPTIONAL];
getModelsOrDefault
in interface BatchTranslateTextRequestOrBuilder
public String getModelsOrThrow(String key)
Optional. The models to use for translation. Map's key is target language code. Map's value is 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 = 4 [(.google.api.field_behavior) = OPTIONAL];
getModelsOrThrow
in interface BatchTranslateTextRequestOrBuilder
public List<InputConfig> getInputConfigsList()
Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsList
in interface BatchTranslateTextRequestOrBuilder
public List<? extends InputConfigOrBuilder> getInputConfigsOrBuilderList()
Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsOrBuilderList
in interface BatchTranslateTextRequestOrBuilder
public int getInputConfigsCount()
Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsCount
in interface BatchTranslateTextRequestOrBuilder
public InputConfig getInputConfigs(int index)
Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED];
getInputConfigs
in interface BatchTranslateTextRequestOrBuilder
public InputConfigOrBuilder getInputConfigsOrBuilder(int index)
Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.
repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED];
getInputConfigsOrBuilder
in interface BatchTranslateTextRequestOrBuilder
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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED];
hasOutputConfig
in interface BatchTranslateTextRequestOrBuilder
public OutputConfig 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED];
getOutputConfig
in interface BatchTranslateTextRequestOrBuilder
public OutputConfigOrBuilder 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED];
getOutputConfigOrBuilder
in interface BatchTranslateTextRequestOrBuilder
public int getGlossariesCount()
BatchTranslateTextRequestOrBuilder
Optional. Glossaries to be applied for translation. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesCount
in interface BatchTranslateTextRequestOrBuilder
public boolean containsGlossaries(String key)
Optional. Glossaries to be applied for translation. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
containsGlossaries
in interface BatchTranslateTextRequestOrBuilder
@Deprecated public Map<String,TranslateTextGlossaryConfig> getGlossaries()
getGlossariesMap()
instead.getGlossaries
in interface BatchTranslateTextRequestOrBuilder
public Map<String,TranslateTextGlossaryConfig> getGlossariesMap()
Optional. Glossaries to be applied for translation. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesMap
in interface BatchTranslateTextRequestOrBuilder
public TranslateTextGlossaryConfig getGlossariesOrDefault(String key, TranslateTextGlossaryConfig defaultValue)
Optional. Glossaries to be applied for translation. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesOrDefault
in interface BatchTranslateTextRequestOrBuilder
public TranslateTextGlossaryConfig getGlossariesOrThrow(String key)
Optional. Glossaries to be applied for translation. It's keyed by target language code.
map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
getGlossariesOrThrow
in interface BatchTranslateTextRequestOrBuilder
public int getLabelsCount()
BatchTranslateTextRequestOrBuilder
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.
map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL];
getLabelsCount
in interface BatchTranslateTextRequestOrBuilder
public boolean containsLabels(String key)
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.
map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL];
containsLabels
in interface BatchTranslateTextRequestOrBuilder
@Deprecated public Map<String,String> getLabels()
getLabelsMap()
instead.getLabels
in interface BatchTranslateTextRequestOrBuilder
public Map<String,String> getLabelsMap()
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.
map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL];
getLabelsMap
in interface BatchTranslateTextRequestOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.
map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrDefault
in interface BatchTranslateTextRequestOrBuilder
public String getLabelsOrThrow(String key)
Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.
map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrThrow
in interface BatchTranslateTextRequestOrBuilder
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 BatchTranslateTextRequest parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static BatchTranslateTextRequest parseFrom(InputStream input) throws IOException
IOException
public static BatchTranslateTextRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static BatchTranslateTextRequest parseDelimitedFrom(InputStream input) throws IOException
IOException
public static BatchTranslateTextRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static BatchTranslateTextRequest parseFrom(CodedInputStream input) throws IOException
IOException
public static BatchTranslateTextRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public BatchTranslateTextRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static BatchTranslateTextRequest.Builder newBuilder()
public static BatchTranslateTextRequest.Builder newBuilder(BatchTranslateTextRequest prototype)
public BatchTranslateTextRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected BatchTranslateTextRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static BatchTranslateTextRequest getDefaultInstance()
public static Parser<BatchTranslateTextRequest> parser()
public Parser<BatchTranslateTextRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public BatchTranslateTextRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.