public final class Example extends GeneratedMessageV3 implements ExampleOrBuilder
A sentence pair.
Protobuf type google.cloud.translation.v3.Example
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SOURCE_TEXT_FIELD_NUMBER
public static final int SOURCE_TEXT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TARGET_TEXT_FIELD_NUMBER
public static final int TARGET_TEXT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
USAGE_FIELD_NUMBER
public static final int USAGE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Example getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Example.Builder newBuilder()
newBuilder(Example prototype)
public static Example.Builder newBuilder(Example prototype)
Parameter |
Name |
Description |
prototype |
Example
|
public static Example parseDelimitedFrom(InputStream input)
public static Example parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Example parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Example parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Example parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Example parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Example parseFrom(CodedInputStream input)
public static Example parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Example parseFrom(InputStream input)
public static Example parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Example parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Example parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Example> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public Example getDefaultInstanceForType()
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.
|
getParserForType()
public Parser<Example> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
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()
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.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Example.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Example.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Example.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides