Package com.google.cloud.translate.v3
Class TranslateDocumentRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
com.google.cloud.translate.v3.TranslateDocumentRequest.Builder
- All Implemented Interfaces:
TranslateDocumentRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TranslateDocumentRequest
public static final class TranslateDocumentRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
implements TranslateDocumentRequestOrBuilder
A document translation request.Protobuf type
google.cloud.translation.v3.TranslateDocumentRequest-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Required.Optional.Optional.Optional.Optional.Optional. is_translate_native_pdf_only field for external customers.Optional.Required.Optional.Required.booleancontainsLabels(String key) Optional.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorRequired.Required.Required.Optional.Optional.Optional.booleanOptional.booleanOptional.Optional.Optional.Optional.booleanOptional. is_translate_native_pdf_only field for external customers.Deprecated.intOptional.Optional.getLabelsOrDefault(String key, String defaultValue) Optional.getLabelsOrThrow(String key) Optional.getModel()Optional.com.google.protobuf.ByteStringOptional.Deprecated.Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.Required.com.google.protobuf.ByteStringRequired.booleanRequired.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanRequired.Optional.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.putAllLabels(Map<String, String> values) Optional.Optional.removeLabels(String key) Optional.setCustomizedAttribution(String value) Optional.setCustomizedAttributionBytes(com.google.protobuf.ByteString value) Optional.Required.setDocumentInputConfig(DocumentInputConfig.Builder builderForValue) Required.Optional.setDocumentOutputConfig(DocumentOutputConfig.Builder builderForValue) Optional.setEnableRotationCorrection(boolean value) Optional.setEnableShadowRemovalNativePdf(boolean value) Optional.Optional.setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue) Optional.setIsTranslateNativePdfOnly(boolean value) Optional. is_translate_native_pdf_only field for external customers.Optional.setModelBytes(com.google.protobuf.ByteString value) Optional.Required.setParentBytes(com.google.protobuf.ByteString value) Required.setSourceLanguageCode(String value) Optional.setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) Optional.setTargetLanguageCode(String value) Required.setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentRequest.Builder>
-
mergeFrom
public TranslateDocumentRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentRequest.Builder>- Throws:
IOException
-
getParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getParentin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The parent.
-
getParentBytes
public com.google.protobuf.ByteString getParentBytes()Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getParentBytesin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The bytes for parent.
-
setParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The parent to set.- Returns:
- This builder for chaining.
-
clearParent
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setParentBytes
Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.string parent = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for parent to set.- Returns:
- This builder for chaining.
-
getSourceLanguageCode
Optional. 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). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourceLanguageCodein interfaceTranslateDocumentRequestOrBuilder- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
public com.google.protobuf.ByteString getSourceLanguageCodeBytes()Optional. 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). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSourceLanguageCodeBytesin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The bytes for sourceLanguageCode.
-
setSourceLanguageCode
Optional. 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). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
clearSourceLanguageCode
Optional. 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). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setSourceLanguageCodeBytes
public TranslateDocumentRequest.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) Optional. 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). If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for sourceLanguageCode to set.- Returns:
- This builder for chaining.
-
getTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodein interfaceTranslateDocumentRequestOrBuilder- Returns:
- The targetLanguageCode.
-
getTargetLanguageCodeBytes
public com.google.protobuf.ByteString getTargetLanguageCodeBytes()Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodeBytesin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The bytes for targetLanguageCode.
-
setTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The targetLanguageCode to set.- Returns:
- This builder for chaining.
-
clearTargetLanguageCode
Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setTargetLanguageCodeBytes
public TranslateDocumentRequest.Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in [Language Support](https://cloud.google.com/translate/docs/languages).
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for targetLanguageCode to set.- Returns:
- This builder for chaining.
-
hasDocumentInputConfig
public boolean hasDocumentInputConfig()Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
hasDocumentInputConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- Whether the documentInputConfig field is set.
-
getDocumentInputConfig
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDocumentInputConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The documentInputConfig.
-
setDocumentInputConfig
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; -
setDocumentInputConfig
public TranslateDocumentRequest.Builder setDocumentInputConfig(DocumentInputConfig.Builder builderForValue) Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; -
mergeDocumentInputConfig
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; -
clearDocumentInputConfig
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; -
getDocumentInputConfigBuilder
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; -
getDocumentInputConfigOrBuilder
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getDocumentInputConfigOrBuilderin interfaceTranslateDocumentRequestOrBuilder
-
hasDocumentOutputConfig
public boolean hasDocumentOutputConfig()Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasDocumentOutputConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- Whether the documentOutputConfig field is set.
-
getDocumentOutputConfig
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDocumentOutputConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The documentOutputConfig.
-
setDocumentOutputConfig
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; -
setDocumentOutputConfig
public TranslateDocumentRequest.Builder setDocumentOutputConfig(DocumentOutputConfig.Builder builderForValue) Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; -
mergeDocumentOutputConfig
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; -
clearDocumentOutputConfig
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getDocumentOutputConfigBuilder
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; -
getDocumentOutputConfigOrBuilder
Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
.google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDocumentOutputConfigOrBuilderin interfaceTranslateDocumentRequestOrBuilder
-
getModel
Optional. The `model` type requested for this translation. The 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 not provided, the default Google model (NMT) will be used for translation.string model = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()Optional. The `model` type requested for this translation. The 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 not provided, the default Google model (NMT) will be used for translation.string model = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelBytesin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The bytes for model.
-
setModel
Optional. The `model` type requested for this translation. The 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 not provided, the default Google model (NMT) will be used for translation.string model = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The model to set.- Returns:
- This builder for chaining.
-
clearModel
Optional. The `model` type requested for this translation. The 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 not provided, the default Google model (NMT) will be used for translation.string model = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setModelBytes
Optional. The `model` type requested for this translation. The 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 not provided, the default Google model (NMT) will be used for translation.string model = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for model to set.- Returns:
- This builder for chaining.
-
hasGlossaryConfig
public boolean hasGlossaryConfig()Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasGlossaryConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- Whether the glossaryConfig field is set.
-
getGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The glossaryConfig.
-
setGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
setGlossaryConfig
public TranslateDocumentRequest.Builder setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue) Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
mergeGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
clearGlossaryConfig
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossaryConfigBuilder
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; -
getGlossaryConfigOrBuilder
Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGlossaryConfigOrBuilderin interfaceTranslateDocumentRequestOrBuilder
-
getLabelsCount
public int getLabelsCount()Description copied from interface:TranslateDocumentRequestOrBuilderOptional. 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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsCountin interfaceTranslateDocumentRequestOrBuilder
-
containsLabels
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsLabelsin interfaceTranslateDocumentRequestOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceTranslateDocumentRequestOrBuilder
-
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsMapin interfaceTranslateDocumentRequestOrBuilder
-
getLabelsOrDefault
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrDefaultin interfaceTranslateDocumentRequestOrBuilder
-
getLabelsOrThrow
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLabelsOrThrowin interfaceTranslateDocumentRequestOrBuilder
-
clearLabels
-
removeLabels
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; -
putAllLabels
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; -
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];- Specified by:
getCustomizedAttributionin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The customizedAttribution.
-
getCustomizedAttributionBytes
public 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];- Specified by:
getCustomizedAttributionBytesin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The bytes for customizedAttribution.
-
setCustomizedAttribution
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];- Parameters:
value- The customizedAttribution to set.- Returns:
- This builder for chaining.
-
clearCustomizedAttribution
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:
- This builder for chaining.
-
setCustomizedAttributionBytes
public TranslateDocumentRequest.Builder setCustomizedAttributionBytes(com.google.protobuf.ByteString value) 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];- Parameters:
value- The bytes for customizedAttribution to set.- Returns:
- This builder for chaining.
-
getIsTranslateNativePdfOnly
public boolean getIsTranslateNativePdfOnly()Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated.
bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIsTranslateNativePdfOnlyin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The isTranslateNativePdfOnly.
-
setIsTranslateNativePdfOnly
Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated.
bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The isTranslateNativePdfOnly to set.- Returns:
- This builder for chaining.
-
clearIsTranslateNativePdfOnly
Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated.
bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
getEnableShadowRemovalNativePdf
public 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 = 12 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEnableShadowRemovalNativePdfin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The enableShadowRemovalNativePdf.
-
setEnableShadowRemovalNativePdf
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 = 12 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The enableShadowRemovalNativePdf to set.- Returns:
- This builder for chaining.
-
clearEnableShadowRemovalNativePdf
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 = 12 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
getEnableRotationCorrection
public boolean getEnableRotationCorrection()Optional. If true, enable auto rotation correction in DVS.
bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEnableRotationCorrectionin interfaceTranslateDocumentRequestOrBuilder- Returns:
- The enableRotationCorrection.
-
setEnableRotationCorrection
Optional. If true, enable auto rotation correction in DVS.
bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The enableRotationCorrection to set.- Returns:
- This builder for chaining.
-
clearEnableRotationCorrection
Optional. If true, enable auto rotation correction in DVS.
bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-