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.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TranslateDocumentResponse
build()
TranslateDocumentResponse
buildPartial()
TranslateDocumentResponse.Builder
clear()
TranslateDocumentResponse.Builder
clearDocumentTranslation()
Translated document.TranslateDocumentResponse.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TranslateDocumentResponse.Builder
clearGlossaryConfig()
The `glossary_config` used for this translation.TranslateDocumentResponse.Builder
clearGlossaryDocumentTranslation()
The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.Builder
clearModel()
Only present when 'model' is present in the request.TranslateDocumentResponse.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TranslateDocumentResponse.Builder
clone()
TranslateDocumentResponse
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
DocumentTranslation
getDocumentTranslation()
Translated document.DocumentTranslation.Builder
getDocumentTranslationBuilder()
Translated document.DocumentTranslationOrBuilder
getDocumentTranslationOrBuilder()
Translated document.TranslateTextGlossaryConfig
getGlossaryConfig()
The `glossary_config` used for this translation.TranslateTextGlossaryConfig.Builder
getGlossaryConfigBuilder()
The `glossary_config` used for this translation.TranslateTextGlossaryConfigOrBuilder
getGlossaryConfigOrBuilder()
The `glossary_config` used for this translation.DocumentTranslation
getGlossaryDocumentTranslation()
The document's translation output if a glossary is provided in the request.DocumentTranslation.Builder
getGlossaryDocumentTranslationBuilder()
The document's translation output if a glossary is provided in the request.DocumentTranslationOrBuilder
getGlossaryDocumentTranslationOrBuilder()
The document's translation output if a glossary is provided in the request.String
getModel()
Only present when 'model' is present in the request.com.google.protobuf.ByteString
getModelBytes()
Only present when 'model' is present in the request.boolean
hasDocumentTranslation()
Translated document.boolean
hasGlossaryConfig()
The `glossary_config` used for this translation.boolean
hasGlossaryDocumentTranslation()
The document's translation output if a glossary is provided in the request.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
TranslateDocumentResponse.Builder
mergeDocumentTranslation(DocumentTranslation value)
Translated document.TranslateDocumentResponse.Builder
mergeFrom(TranslateDocumentResponse other)
TranslateDocumentResponse.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
TranslateDocumentResponse.Builder
mergeFrom(com.google.protobuf.Message other)
TranslateDocumentResponse.Builder
mergeGlossaryConfig(TranslateTextGlossaryConfig value)
The `glossary_config` used for this translation.TranslateDocumentResponse.Builder
mergeGlossaryDocumentTranslation(DocumentTranslation value)
The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TranslateDocumentResponse.Builder
setDocumentTranslation(DocumentTranslation value)
Translated document.TranslateDocumentResponse.Builder
setDocumentTranslation(DocumentTranslation.Builder builderForValue)
Translated document.TranslateDocumentResponse.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TranslateDocumentResponse.Builder
setGlossaryConfig(TranslateTextGlossaryConfig value)
The `glossary_config` used for this translation.TranslateDocumentResponse.Builder
setGlossaryConfig(TranslateTextGlossaryConfig.Builder builderForValue)
The `glossary_config` used for this translation.TranslateDocumentResponse.Builder
setGlossaryDocumentTranslation(DocumentTranslation value)
The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.Builder
setGlossaryDocumentTranslation(DocumentTranslation.Builder builderForValue)
The document's translation output if a glossary is provided in the request.TranslateDocumentResponse.Builder
setModel(String value)
Only present when 'model' is present in the request.TranslateDocumentResponse.Builder
setModelBytes(com.google.protobuf.ByteString value)
Only present when 'model' is present in the request.TranslateDocumentResponse.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
TranslateDocumentResponse.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
clear
public TranslateDocumentResponse.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<TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
getDefaultInstanceForType
public TranslateDocumentResponse getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TranslateDocumentResponse build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TranslateDocumentResponse buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
setField
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
clearField
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
clearOneof
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
setRepeatedField
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
addRepeatedField
public TranslateDocumentResponse.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<TranslateDocumentResponse.Builder>
-
mergeFrom
public TranslateDocumentResponse.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TranslateDocumentResponse.Builder>
-
mergeFrom
public TranslateDocumentResponse.Builder mergeFrom(TranslateDocumentResponse other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
hasDocumentTranslation
in interfaceTranslateDocumentResponseOrBuilder
- Returns:
- Whether the documentTranslation field is set.
-
getDocumentTranslation
public DocumentTranslation getDocumentTranslation()
Translated document.
.google.cloud.translation.v3.DocumentTranslation document_translation = 1;
- Specified by:
getDocumentTranslation
in 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:
getDocumentTranslationOrBuilder
in 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:
hasGlossaryDocumentTranslation
in 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:
getGlossaryDocumentTranslation
in 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:
getGlossaryDocumentTranslationOrBuilder
in 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:
getModel
in 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:
getModelBytes
in 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:
hasGlossaryConfig
in 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:
getGlossaryConfig
in 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:
getGlossaryConfigOrBuilder
in interfaceTranslateDocumentResponseOrBuilder
-
setUnknownFields
public final TranslateDocumentResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
mergeUnknownFields
public final TranslateDocumentResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder>
-
-