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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder> implements TranslateDocumentResponseOrBuilder
A translated document response message.
Protobuf typegoogle.cloud.translation.v3.TranslateDocumentResponse
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TranslateDocumentResponse.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TranslateDocumentResponsebuild()TranslateDocumentResponsebuildPartial()TranslateDocumentResponse.Builderclear()TranslateDocumentResponse.BuilderclearDocumentTranslation()Translated document.TranslateDocumentResponse.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)TranslateDocumentResponse.BuilderclearGlossaryConfig()The `glossary_config` used for this translation.TranslateDocumentResponse.BuilderclearGlossaryDocumentTranslation()The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.BuilderclearModel()Only present when 'model' is present in the request.TranslateDocumentResponse.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)TranslateDocumentResponse.Builderclone()TranslateDocumentResponsegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()DocumentTranslationgetDocumentTranslation()Translated document.DocumentTranslation.BuildergetDocumentTranslationBuilder()Translated document.DocumentTranslationOrBuildergetDocumentTranslationOrBuilder()Translated document.TranslateTextGlossaryConfiggetGlossaryConfig()The `glossary_config` used for this translation.TranslateTextGlossaryConfig.BuildergetGlossaryConfigBuilder()The `glossary_config` used for this translation.TranslateTextGlossaryConfigOrBuildergetGlossaryConfigOrBuilder()The `glossary_config` used for this translation.DocumentTranslationgetGlossaryDocumentTranslation()The document's translation output if a glossary is provided in the request.DocumentTranslation.BuildergetGlossaryDocumentTranslationBuilder()The document's translation output if a glossary is provided in the request.DocumentTranslationOrBuildergetGlossaryDocumentTranslationOrBuilder()The document's translation output if a glossary is provided in the request.StringgetModel()Only present when 'model' is present in the request.com.google.protobuf.ByteStringgetModelBytes()Only present when 'model' is present in the request.booleanhasDocumentTranslation()Translated document.booleanhasGlossaryConfig()The `glossary_config` used for this translation.booleanhasGlossaryDocumentTranslation()The document's translation output if a glossary is provided in the request.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TranslateDocumentResponse.BuildermergeDocumentTranslation(DocumentTranslation value)Translated document.TranslateDocumentResponse.BuildermergeFrom(TranslateDocumentResponse other)TranslateDocumentResponse.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)TranslateDocumentResponse.BuildermergeFrom(com.google.protobuf.Message other)TranslateDocumentResponse.BuildermergeGlossaryConfig(TranslateTextGlossaryConfig value)The `glossary_config` used for this translation.TranslateDocumentResponse.BuildermergeGlossaryDocumentTranslation(DocumentTranslation value)The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TranslateDocumentResponse.BuildersetDocumentTranslation(DocumentTranslation value)Translated document.TranslateDocumentResponse.BuildersetDocumentTranslation(DocumentTranslation.Builder builderForValue)Translated document.TranslateDocumentResponse.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TranslateDocumentResponse.BuildersetGlossaryConfig(TranslateTextGlossaryConfig value)The `glossary_config` used for this translation.TranslateDocumentResponse.BuildersetGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue)The `glossary_config` used for this translation.TranslateDocumentResponse.BuildersetGlossaryDocumentTranslation(DocumentTranslation value)The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.BuildersetGlossaryDocumentTranslation(DocumentTranslation.Builder builderForValue)The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.BuildersetModel(String value)Only present when 'model' is present in the request.TranslateDocumentResponse.BuildersetModelBytes(com.google.protobuf.ByteString value)Only present when 'model' is present in the request.TranslateDocumentResponse.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)TranslateDocumentResponse.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, 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()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
clear
public TranslateDocumentResponse.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
getDefaultInstanceForType
public TranslateDocumentResponse getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public TranslateDocumentResponse build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TranslateDocumentResponse buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TranslateDocumentResponse.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
setField
public TranslateDocumentResponse.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
clearField
public TranslateDocumentResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
clearOneof
public TranslateDocumentResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
setRepeatedField
public TranslateDocumentResponse.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
addRepeatedField
public TranslateDocumentResponse.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
mergeFrom
public TranslateDocumentResponse.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentResponse.Builder>
-
mergeFrom
public TranslateDocumentResponse.Builder mergeFrom(TranslateDocumentResponse other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public DocumentTranslation getDocumentTranslation()
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;- Specified by:
getDocumentTranslationin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The documentTranslation.
-
setDocumentTranslation
public TranslateDocumentResponse.Builder setDocumentTranslation(DocumentTranslation value)
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
public TranslateDocumentResponse.Builder mergeDocumentTranslation(DocumentTranslation value)
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;
-
clearDocumentTranslation
public TranslateDocumentResponse.Builder clearDocumentTranslation()
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;
-
getDocumentTranslationBuilder
public DocumentTranslation.Builder getDocumentTranslationBuilder()
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;
-
getDocumentTranslationOrBuilder
public DocumentTranslationOrBuilder 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
public DocumentTranslation 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
public TranslateDocumentResponse.Builder setGlossaryDocumentTranslation(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;
-
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
public TranslateDocumentResponse.Builder 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
public DocumentTranslation.Builder 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
public DocumentTranslationOrBuilder 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
public String 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
public TranslateDocumentResponse.Builder setModel(String value)
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
public TranslateDocumentResponse.Builder 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
public TranslateDocumentResponse.Builder setModelBytes(com.google.protobuf.ByteString value)
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
public TranslateTextGlossaryConfig getGlossaryConfig()
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;- Specified by:
getGlossaryConfigin interfaceTranslateDocumentResponseOrBuilder- Returns:
- The glossaryConfig.
-
setGlossaryConfig
public TranslateDocumentResponse.Builder setGlossaryConfig(TranslateTextGlossaryConfig value)
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
public TranslateDocumentResponse.Builder mergeGlossaryConfig(TranslateTextGlossaryConfig value)
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
-
clearGlossaryConfig
public TranslateDocumentResponse.Builder clearGlossaryConfig()
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
-
getGlossaryConfigBuilder
public TranslateTextGlossaryConfig.Builder getGlossaryConfigBuilder()
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;
-
getGlossaryConfigOrBuilder
public TranslateTextGlossaryConfigOrBuilder getGlossaryConfigOrBuilder()
The `glossary_config` used for this translation.
.google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4;- Specified by:
getGlossaryConfigOrBuilderin interfaceTranslateDocumentResponseOrBuilder
-
setUnknownFields
public final TranslateDocumentResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
mergeUnknownFields
public final TranslateDocumentResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
-