Class TranslateDocumentResponse.Builder (2.9.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class TranslateDocumentResponse.Builder extends GeneratedMessageV3.Builder<TranslateDocumentResponse.Builder> implements TranslateDocumentResponseOrBuilder

A translated document response message.

Protobuf type google.cloud.translation.v3beta1.TranslateDocumentResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TranslateDocumentResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TranslateDocumentResponse.Builder
Overrides

build()

public TranslateDocumentResponse build()
Returns
TypeDescription
TranslateDocumentResponse

buildPartial()

public TranslateDocumentResponse buildPartial()
Returns
TypeDescription
TranslateDocumentResponse

clear()

public TranslateDocumentResponse.Builder clear()
Returns
TypeDescription
TranslateDocumentResponse.Builder
Overrides

clearDocumentTranslation()

public TranslateDocumentResponse.Builder clearDocumentTranslation()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
TranslateDocumentResponse.Builder

clearField(Descriptors.FieldDescriptor field)

public TranslateDocumentResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TranslateDocumentResponse.Builder
Overrides

clearGlossaryConfig()

public TranslateDocumentResponse.Builder clearGlossaryConfig()

The glossary_config used for this translation.

.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;

Returns
TypeDescription
TranslateDocumentResponse.Builder

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.v3beta1.DocumentTranslation glossary_document_translation = 2;

Returns
TypeDescription
TranslateDocumentResponse.Builder

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
TypeDescription
TranslateDocumentResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslateDocumentResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TranslateDocumentResponse.Builder
Overrides

clone()

public TranslateDocumentResponse.Builder clone()
Returns
TypeDescription
TranslateDocumentResponse.Builder
Overrides

getDefaultInstanceForType()

public TranslateDocumentResponse getDefaultInstanceForType()
Returns
TypeDescription
TranslateDocumentResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocumentTranslation()

public DocumentTranslation getDocumentTranslation()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
DocumentTranslation

The documentTranslation.

getDocumentTranslationBuilder()

public DocumentTranslation.Builder getDocumentTranslationBuilder()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns
TypeDescription
DocumentTranslation.Builder

getDocumentTranslationOrBuilder()

public DocumentTranslationOrBuilder getDocumentTranslationOrBuilder()

Translated document.

.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;

Returns