Package com.google.cloud.translate.v3
Class TranslateDocumentResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TranslateDocumentResponse.Builder>
com.google.cloud.translate.v3.TranslateDocumentResponse.Builder
- All Implemented Interfaces:
TranslateDocumentResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TranslateDocumentResponse
public static final class TranslateDocumentResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TranslateDocumentResponse.Builder>
implements TranslateDocumentResponseOrBuilder
A translated document response message.Protobuf type
google.cloud.translation.v3.TranslateDocumentResponse-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Translated document.The `glossary_config` used for this translation.The document's translation output if a glossary is provided in the request.Only present when 'model' is present in the request.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorTranslated document.Translated document.Translated document.The `glossary_config` used for this translation.The `glossary_config` used for this translation.The `glossary_config` used for this translation.The document's translation output if a glossary is provided in the request.The document's translation output if a glossary is provided in the request.The document's translation output if a glossary is provided in the request.getModel()Only present when 'model' is present in the request.com.google.protobuf.ByteStringOnly present when 'model' is present in the request.booleanTranslated document.booleanThe `glossary_config` used for this translation.booleanThe document's translation output if a glossary is provided in the request.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanTranslated document.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The `glossary_config` used for this translation.The document's translation output if a glossary is provided in the request.Translated document.setDocumentTranslation(DocumentTranslation.Builder builderForValue) Translated document.The `glossary_config` used for this translation.setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue) The `glossary_config` used for this translation.The document's translation output if a glossary is provided in the request.setGlossaryDocumentTranslation(DocumentTranslation.Builder builderForValue) The document's translation output if a glossary is provided in the request.Only present when 'model' is present in the request.setModelBytes(com.google.protobuf.ByteString value) Only present when 'model' is present in the request.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentResponse.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<TranslateDocumentResponse.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<TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TranslateDocumentResponse.Builder>
-
mergeFrom
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>- Throws:
IOException
-
hasDocumentTranslation
public boolean hasDocumentTranslation()Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;- Specified by:
hasDocumentTranslationin interfaceTranslateDocumentResponseOrBuilder- Returns:
- Whether the documentTranslation field is set.
-
getDocumentTranslation
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;- Specified by:
getDocumentTranslationin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The documentTranslation.
-
setDocumentTranslation
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1; -
setDocumentTranslation
public TranslateDocumentResponse.Builder setDocumentTranslation(DocumentTranslation.Builder builderForValue) Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1; -
mergeDocumentTranslation
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1; -
clearDocumentTranslation
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1; -
getDocumentTranslationBuilder
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1; -
getDocumentTranslationOrBuilder
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;- Specified by:
getDocumentTranslationOrBuilderin interfaceTranslateDocumentResponseOrBuilder
-
hasGlossaryDocumentTranslation
public boolean hasGlossaryDocumentTranslation()The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;- Specified by:
hasGlossaryDocumentTranslationin interfaceTranslateDocumentResponseOrBuilder- Returns:
- Whether the glossaryDocumentTranslation field is set.
-
getGlossaryDocumentTranslation
The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;- Specified by:
getGlossaryDocumentTranslationin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The glossaryDocumentTranslation.
-
setGlossaryDocumentTranslation
The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; -
setGlossaryDocumentTranslation
public TranslateDocumentResponse.Builder setGlossaryDocumentTranslation(DocumentTranslation.Builder builderForValue) The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; -
mergeGlossaryDocumentTranslation
public TranslateDocumentResponse.Builder mergeGlossaryDocumentTranslation(DocumentTranslation value) The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; -
clearGlossaryDocumentTranslation
The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; -
getGlossaryDocumentTranslationBuilder
The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; -
getGlossaryDocumentTranslationOrBuilder
The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply.
.google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2;- Specified by:
getGlossaryDocumentTranslationOrBuilderin interfaceTranslateDocumentResponseOrBuilder
-
getModel
Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.string model = 3;- Specified by:
getModelin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.string model = 3;- Specified by:
getModelBytesin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The bytes for model.
-
setModel
Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.string model = 3;- Parameters:
value- The model to set.- Returns:
- This builder for chaining.
-
clearModel
Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.string model = 3;- Returns:
- This builder for chaining.
-
setModelBytes
Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.string model = 3;- Parameters:
value- The bytes for model to set.- Returns:
- This builder for chaining.
-
hasGlossaryConfig
public boolean hasGlossaryConfig()The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;- Specified by:
hasGlossaryConfigin interfaceTranslateDocumentResponseOrBuilder- Returns:
- Whether the glossaryConfig field is set.
-
getGlossaryConfig
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;- Specified by:
getGlossaryConfigin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The glossaryConfig.
-
setGlossaryConfig
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; -
setGlossaryConfig
public TranslateDocumentResponse.Builder setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue) The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; -
mergeGlossaryConfig
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; -
clearGlossaryConfig
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; -
getGlossaryConfigBuilder
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; -
getGlossaryConfigOrBuilder
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;- Specified by:
getGlossaryConfigOrBuilderin interfaceTranslateDocumentResponseOrBuilder
-