Package com.google.cloud.translate.v3
Class TranslateDocumentRequest
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.translate.v3.TranslateDocumentRequest
-
- All Implemented Interfaces:
TranslateDocumentRequestOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class TranslateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 implements TranslateDocumentRequestOrBuilder
A document translation request.
Protobuf typegoogle.cloud.translation.v3.TranslateDocumentRequest
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TranslateDocumentRequest.Builder
A document translation request.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
CUSTOMIZED_ATTRIBUTION_FIELD_NUMBER
static int
DOCUMENT_INPUT_CONFIG_FIELD_NUMBER
static int
DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER
static int
ENABLE_ROTATION_CORRECTION_FIELD_NUMBER
static int
ENABLE_SHADOW_REMOVAL_NATIVE_PDF_FIELD_NUMBER
static int
GLOSSARY_CONFIG_FIELD_NUMBER
static int
IS_TRANSLATE_NATIVE_PDF_ONLY_FIELD_NUMBER
static int
LABELS_FIELD_NUMBER
static int
MODEL_FIELD_NUMBER
static int
PARENT_FIELD_NUMBER
static int
SOURCE_LANGUAGE_CODE_FIELD_NUMBER
static int
TARGET_LANGUAGE_CODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsLabels(String key)
Optional.boolean
equals(Object obj)
String
getCustomizedAttribution()
Optional.com.google.protobuf.ByteString
getCustomizedAttributionBytes()
Optional.static TranslateDocumentRequest
getDefaultInstance()
TranslateDocumentRequest
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
DocumentInputConfig
getDocumentInputConfig()
Required.DocumentInputConfigOrBuilder
getDocumentInputConfigOrBuilder()
Required.DocumentOutputConfig
getDocumentOutputConfig()
Optional.DocumentOutputConfigOrBuilder
getDocumentOutputConfigOrBuilder()
Optional.boolean
getEnableRotationCorrection()
Optional.boolean
getEnableShadowRemovalNativePdf()
Optional.TranslateTextGlossaryConfig
getGlossaryConfig()
Optional.TranslateTextGlossaryConfigOrBuilder
getGlossaryConfigOrBuilder()
Optional.boolean
getIsTranslateNativePdfOnly()
Optional.Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
Optional.Map<String,String>
getLabelsMap()
Optional.String
getLabelsOrDefault(String key, String defaultValue)
Optional.String
getLabelsOrThrow(String key)
Optional.String
getModel()
Optional.com.google.protobuf.ByteString
getModelBytes()
Optional.String
getParent()
Required.com.google.protobuf.ByteString
getParentBytes()
Required.com.google.protobuf.Parser<TranslateDocumentRequest>
getParserForType()
int
getSerializedSize()
String
getSourceLanguageCode()
Optional.com.google.protobuf.ByteString
getSourceLanguageCodeBytes()
Optional.String
getTargetLanguageCode()
Required.com.google.protobuf.ByteString
getTargetLanguageCodeBytes()
Required.boolean
hasDocumentInputConfig()
Required.boolean
hasDocumentOutputConfig()
Optional.boolean
hasGlossaryConfig()
Optional.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static TranslateDocumentRequest.Builder
newBuilder()
static TranslateDocumentRequest.Builder
newBuilder(TranslateDocumentRequest prototype)
TranslateDocumentRequest.Builder
newBuilderForType()
protected TranslateDocumentRequest.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static TranslateDocumentRequest
parseDelimitedFrom(InputStream input)
static TranslateDocumentRequest
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateDocumentRequest
parseFrom(byte[] data)
static TranslateDocumentRequest
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateDocumentRequest
parseFrom(com.google.protobuf.ByteString data)
static TranslateDocumentRequest
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateDocumentRequest
parseFrom(com.google.protobuf.CodedInputStream input)
static TranslateDocumentRequest
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateDocumentRequest
parseFrom(InputStream input)
static TranslateDocumentRequest
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateDocumentRequest
parseFrom(ByteBuffer data)
static TranslateDocumentRequest
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<TranslateDocumentRequest>
parser()
TranslateDocumentRequest.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
PARENT_FIELD_NUMBER
public static final int PARENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SOURCE_LANGUAGE_CODE_FIELD_NUMBER
public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TARGET_LANGUAGE_CODE_FIELD_NUMBER
public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOCUMENT_INPUT_CONFIG_FIELD_NUMBER
public static final int DOCUMENT_INPUT_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER
public static final int DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
GLOSSARY_CONFIG_FIELD_NUMBER
public static final int GLOSSARY_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CUSTOMIZED_ATTRIBUTION_FIELD_NUMBER
public static final int CUSTOMIZED_ATTRIBUTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IS_TRANSLATE_NATIVE_PDF_ONLY_FIELD_NUMBER
public static final int IS_TRANSLATE_NATIVE_PDF_ONLY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENABLE_SHADOW_REMOVAL_NATIVE_PDF_FIELD_NUMBER
public static final int ENABLE_SHADOW_REMOVAL_NATIVE_PDF_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENABLE_ROTATION_CORRECTION_FIELD_NUMBER
public static final int ENABLE_ROTATION_CORRECTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
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
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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.
-
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.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TranslateDocumentRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateDocumentRequest parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateDocumentRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TranslateDocumentRequest parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TranslateDocumentRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateDocumentRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateDocumentRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public TranslateDocumentRequest.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TranslateDocumentRequest.Builder newBuilder()
-
newBuilder
public static TranslateDocumentRequest.Builder newBuilder(TranslateDocumentRequest prototype)
-
toBuilder
public TranslateDocumentRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TranslateDocumentRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TranslateDocumentRequest getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TranslateDocumentRequest> parser()
-
getParserForType
public com.google.protobuf.Parser<TranslateDocumentRequest> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TranslateDocumentRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-