Class AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder (2.48.0)

public static final class AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder extends GeneratedMessageV3.Builder<AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder> implements AdaptiveMtTranslateRequest.ReferenceSentencePairOrBuilder

A pair of sentences used as reference in source and target languages.

Protobuf type google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

build()

public AdaptiveMtTranslateRequest.ReferenceSentencePair build()
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair

buildPartial()

public AdaptiveMtTranslateRequest.ReferenceSentencePair buildPartial()
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair

clear()

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clear()
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

clearSourceSentence()

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clearSourceSentence()

Source sentence in the sentence pair.

string source_sentence = 1;

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

clearTargetSentence()

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clearTargetSentence()

Target sentence in the sentence pair.

string target_sentence = 2;

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

clone()

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder clone()
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

getDefaultInstanceForType()

public AdaptiveMtTranslateRequest.ReferenceSentencePair getDefaultInstanceForType()
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair

getDescriptorForType()

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

getSourceSentence()

public String getSourceSentence()

Source sentence in the sentence pair.

string source_sentence = 1;

Returns
Type Description
String

The sourceSentence.

getSourceSentenceBytes()

public ByteString getSourceSentenceBytes()

Source sentence in the sentence pair.

string source_sentence = 1;

Returns
Type Description
ByteString

The bytes for sourceSentence.

getTargetSentence()

public String getTargetSentence()

Target sentence in the sentence pair.

string target_sentence = 2;

Returns
Type Description
String

The targetSentence.

getTargetSentenceBytes()

public ByteString getTargetSentenceBytes()

Target sentence in the sentence pair.

string target_sentence = 2;

Returns
Type Description
ByteString

The bytes for targetSentence.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdaptiveMtTranslateRequest.ReferenceSentencePair other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides

setSourceSentence(String value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setSourceSentence(String value)

Source sentence in the sentence pair.

string source_sentence = 1;

Parameter
Name Description
value String

The sourceSentence to set.

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

setSourceSentenceBytes(ByteString value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setSourceSentenceBytes(ByteString value)

Source sentence in the sentence pair.

string source_sentence = 1;

Parameter
Name Description
value ByteString

The bytes for sourceSentence to set.

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

setTargetSentence(String value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setTargetSentence(String value)

Target sentence in the sentence pair.

string target_sentence = 2;

Parameter
Name Description
value String

The targetSentence to set.

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

setTargetSentenceBytes(ByteString value)

public AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setTargetSentenceBytes(ByteString value)

Target sentence in the sentence pair.

string target_sentence = 2;

Parameter
Name Description
value ByteString

The bytes for targetSentence to set.

Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdaptiveMtTranslateRequest.ReferenceSentencePair.Builder
Overrides