Class RefineTextResponse.Builder (2.83.0)

public static final class RefineTextResponse.Builder extends GeneratedMessage.Builder<RefineTextResponse.Builder> implements RefineTextResponseOrBuilder

Response message for RefineText.

Protobuf type google.cloud.translation.v3beta1.RefineTextResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRefinedTranslations(Iterable<String> values)

public RefineTextResponse.Builder addAllRefinedTranslations(Iterable<String> values)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameter
Name Description
values Iterable<String>

The refinedTranslations to add.

Returns
Type Description
RefineTextResponse.Builder

This builder for chaining.

addRefinedTranslations(String value)

public RefineTextResponse.Builder addRefinedTranslations(String value)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameter
Name Description
value String

The refinedTranslations to add.

Returns
Type Description
RefineTextResponse.Builder

This builder for chaining.

addRefinedTranslationsBytes(ByteString value)

public RefineTextResponse.Builder addRefinedTranslationsBytes(ByteString value)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameter
Name Description
value ByteString

The bytes of the refinedTranslations to add.

Returns
Type Description
RefineTextResponse.Builder

This builder for chaining.

build()

public RefineTextResponse build()
Returns
Type Description
RefineTextResponse

buildPartial()

public RefineTextResponse buildPartial()
Returns
Type Description
RefineTextResponse

clear()

public RefineTextResponse.Builder clear()
Returns
Type Description
RefineTextResponse.Builder
Overrides

clearRefinedTranslations()

public RefineTextResponse.Builder clearRefinedTranslations()

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Returns
Type Description
RefineTextResponse.Builder

This builder for chaining.

getDefaultInstanceForType()

public RefineTextResponse getDefaultInstanceForType()
Returns
Type Description
RefineTextResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getRefinedTranslations(int index)

public String getRefinedTranslations(int index)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The refinedTranslations at the given index.

getRefinedTranslationsBytes(int index)

public ByteString getRefinedTranslationsBytes(int index)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the refinedTranslations at the given index.

getRefinedTranslationsCount()

public int getRefinedTranslationsCount()

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Returns
Type Description
int

The count of refinedTranslations.

getRefinedTranslationsList()

public ProtocolStringList getRefinedTranslationsList()

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Returns
Type Description
ProtocolStringList

A list containing the refinedTranslations.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RefineTextResponse other)

public RefineTextResponse.Builder mergeFrom(RefineTextResponse other)
Parameter
Name Description
other RefineTextResponse
Returns
Type Description
RefineTextResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RefineTextResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RefineTextResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RefineTextResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RefineTextResponse.Builder
Overrides

setRefinedTranslations(int index, String value)

public RefineTextResponse.Builder setRefinedTranslations(int index, String value)

The refined translations obtained from the original translations.

repeated string refined_translations = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The refinedTranslations to set.

Returns
Type Description
RefineTextResponse.Builder

This builder for chaining.