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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder> implements TranslateDocumentRequestOrBuilder
A document translation request.
Protobuf typegoogle.cloud.translation.v3.TranslateDocumentRequest
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
clear
public TranslateDocumentRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
getDefaultInstanceForType
public TranslateDocumentRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TranslateDocumentRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TranslateDocumentRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TranslateDocumentRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
setField
public TranslateDocumentRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
clearField
public TranslateDocumentRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
clearOneof
public TranslateDocumentRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
setRepeatedField
public TranslateDocumentRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
addRepeatedField
public TranslateDocumentRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
mergeFrom
public TranslateDocumentRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentRequest.Builder>
-
mergeFrom
public TranslateDocumentRequest.Builder mergeFrom(TranslateDocumentRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
mergeFrom
public TranslateDocumentRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentRequest.Builder>
- Throws:
IOException
-
getParent
public String 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:
getParent
in 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:
getParentBytes
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The bytes for parent.
-
setParent
public TranslateDocumentRequest.Builder setParent(String value)
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
public TranslateDocumentRequest.Builder 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
public TranslateDocumentRequest.Builder setParentBytes(com.google.protobuf.ByteString value)
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
public String 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. 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:
getSourceLanguageCode
in 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. 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:
getSourceLanguageCodeBytes
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The bytes for sourceLanguageCode.
-
setSourceLanguageCode
public TranslateDocumentRequest.Builder setSourceLanguageCode(String 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. 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
public TranslateDocumentRequest.Builder 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. 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. 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
public String 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.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getTargetLanguageCode
in 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.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getTargetLanguageCodeBytes
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The bytes for targetLanguageCode.
-
setTargetLanguageCode
public TranslateDocumentRequest.Builder setTargetLanguageCode(String 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.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The targetLanguageCode to set.- Returns:
- This builder for chaining.
-
clearTargetLanguageCode
public TranslateDocumentRequest.Builder 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.
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.
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:
hasDocumentInputConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- Whether the documentInputConfig field is set.
-
getDocumentInputConfig
public DocumentInputConfig getDocumentInputConfig()
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getDocumentInputConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The documentInputConfig.
-
setDocumentInputConfig
public TranslateDocumentRequest.Builder setDocumentInputConfig(DocumentInputConfig value)
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
public TranslateDocumentRequest.Builder mergeDocumentInputConfig(DocumentInputConfig value)
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
-
clearDocumentInputConfig
public TranslateDocumentRequest.Builder clearDocumentInputConfig()
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
-
getDocumentInputConfigBuilder
public DocumentInputConfig.Builder getDocumentInputConfigBuilder()
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
-
getDocumentInputConfigOrBuilder
public DocumentInputConfigOrBuilder getDocumentInputConfigOrBuilder()
Required. Input configurations.
.google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getDocumentInputConfigOrBuilder
in 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:
hasDocumentOutputConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- Whether the documentOutputConfig field is set.
-
getDocumentOutputConfig
public DocumentOutputConfig 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:
getDocumentOutputConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The documentOutputConfig.
-
setDocumentOutputConfig
public TranslateDocumentRequest.Builder setDocumentOutputConfig(DocumentOutputConfig value)
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
public TranslateDocumentRequest.Builder mergeDocumentOutputConfig(DocumentOutputConfig value)
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
public TranslateDocumentRequest.Builder 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
public DocumentOutputConfig.Builder 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
public DocumentOutputConfigOrBuilder 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:
getDocumentOutputConfigOrBuilder
in interfaceTranslateDocumentRequestOrBuilder
-
getModel
public String 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:
getModel
in 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:
getModelBytes
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The bytes for model.
-
setModel
public TranslateDocumentRequest.Builder setModel(String value)
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
public TranslateDocumentRequest.Builder 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
public TranslateDocumentRequest.Builder setModelBytes(com.google.protobuf.ByteString value)
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:
hasGlossaryConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- Whether the glossaryConfig field is set.
-
getGlossaryConfig
public TranslateTextGlossaryConfig 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:
getGlossaryConfig
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The glossaryConfig.
-
setGlossaryConfig
public TranslateDocumentRequest.Builder setGlossaryConfig(TranslateTextGlossaryConfig value)
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
public TranslateDocumentRequest.Builder mergeGlossaryConfig(TranslateTextGlossaryConfig value)
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
public TranslateDocumentRequest.Builder 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
public TranslateTextGlossaryConfig.Builder 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
public TranslateTextGlossaryConfigOrBuilder 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:
getGlossaryConfigOrBuilder
in interfaceTranslateDocumentRequestOrBuilder
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:TranslateDocumentRequestOrBuilder
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:
getLabelsCount
in interfaceTranslateDocumentRequestOrBuilder
-
containsLabels
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
containsLabels
in interfaceTranslateDocumentRequestOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceTranslateDocumentRequestOrBuilder
-
getLabelsMap
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsMap
in interfaceTranslateDocumentRequestOrBuilder
-
getLabelsOrDefault
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsOrDefault
in interfaceTranslateDocumentRequestOrBuilder
-
getLabelsOrThrow
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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getLabelsOrThrow
in interfaceTranslateDocumentRequestOrBuilder
-
clearLabels
public TranslateDocumentRequest.Builder clearLabels()
-
removeLabels
public TranslateDocumentRequest.Builder removeLabels(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/advanced/labels for more information.
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public TranslateDocumentRequest.Builder putLabels(String key, String value)
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
public TranslateDocumentRequest.Builder putAllLabels(Map<String,String> values)
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
public String getCustomizedAttribution()
Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos
string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getCustomizedAttribution
in 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:
getCustomizedAttributionBytes
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The bytes for customizedAttribution.
-
setCustomizedAttribution
public TranslateDocumentRequest.Builder setCustomizedAttribution(String 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 customizedAttribution to set.- Returns:
- This builder for chaining.
-
clearCustomizedAttribution
public TranslateDocumentRequest.Builder 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:
getIsTranslateNativePdfOnly
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The isTranslateNativePdfOnly.
-
setIsTranslateNativePdfOnly
public TranslateDocumentRequest.Builder setIsTranslateNativePdfOnly(boolean value)
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
public TranslateDocumentRequest.Builder 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:
getEnableShadowRemovalNativePdf
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The enableShadowRemovalNativePdf.
-
setEnableShadowRemovalNativePdf
public TranslateDocumentRequest.Builder setEnableShadowRemovalNativePdf(boolean value)
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
public TranslateDocumentRequest.Builder 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:
getEnableRotationCorrection
in interfaceTranslateDocumentRequestOrBuilder
- Returns:
- The enableRotationCorrection.
-
setEnableRotationCorrection
public TranslateDocumentRequest.Builder setEnableRotationCorrection(boolean value)
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
public TranslateDocumentRequest.Builder 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.
-
setUnknownFields
public final TranslateDocumentRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
mergeUnknownFields
public final TranslateDocumentRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentRequest.Builder>
-
-