Class Example.Builder (2.53.0)

public static final class Example.Builder extends GeneratedMessageV3.Builder<Example.Builder> implements ExampleOrBuilder

A sentence pair.

Protobuf type google.cloud.translation.v3.Example

Implements

ExampleOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Example build()
Returns
Type Description
Example

buildPartial()

public Example buildPartial()
Returns
Type Description
Example

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Example.Builder clearName()

Output only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Example.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSourceText()

public Example.Builder clearSourceText()

Sentence in source language.

string source_text = 2;

Returns
Type Description
Example.Builder

This builder for chaining.

clearTargetText()

public Example.Builder clearTargetText()

Sentence in target language.

string target_text = 3;

Returns
Type Description
Example.Builder

This builder for chaining.

clearUsage()

public Example.Builder clearUsage()

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Example.Builder

This builder for chaining.

clone()

public Example.Builder clone()
Returns
Type Description
Example.Builder
Overrides

getDefaultInstanceForType()

public Example getDefaultInstanceForType()
Returns
Type Description
Example

getDescriptorForType()

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

getName()

public String getName()

Output only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getSourceText()

public String getSourceText()

Sentence in source language.

string source_text = 2;

Returns
Type Description
String

The sourceText.

getSourceTextBytes()

public ByteString getSourceTextBytes()

Sentence in source language.

string source_text = 2;

Returns
Type Description
ByteString

The bytes for sourceText.

getTargetText()

public String getTargetText()

Sentence in target language.

string target_text = 3;

Returns
Type Description
String

The targetText.

getTargetTextBytes()

public ByteString getTargetTextBytes()

Sentence in target language.

string target_text = 3;

Returns
Type Description
ByteString

The bytes for targetText.

getUsage()

public String getUsage()

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The usage.

getUsageBytes()

public ByteString getUsageBytes()

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for usage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Example other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Example.Builder setName(String value)

Output only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Example.Builder setNameBytes(ByteString value)

Output only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Example.Builder

This builder for chaining.

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

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

setSourceText(String value)

public Example.Builder setSourceText(String value)

Sentence in source language.

string source_text = 2;

Parameter
Name Description
value String

The sourceText to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setSourceTextBytes(ByteString value)

public Example.Builder setSourceTextBytes(ByteString value)

Sentence in source language.

string source_text = 2;

Parameter
Name Description
value ByteString

The bytes for sourceText to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setTargetText(String value)

public Example.Builder setTargetText(String value)

Sentence in target language.

string target_text = 3;

Parameter
Name Description
value String

The targetText to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setTargetTextBytes(ByteString value)

public Example.Builder setTargetTextBytes(ByteString value)

Sentence in target language.

string target_text = 3;

Parameter
Name Description
value ByteString

The bytes for targetText to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUsage(String value)

public Example.Builder setUsage(String value)

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The usage to set.

Returns
Type Description
Example.Builder

This builder for chaining.

setUsageBytes(ByteString value)

public Example.Builder setUsageBytes(ByteString value)

Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for usage to set.

Returns
Type Description
Example.Builder

This builder for chaining.