Send feedback
Class Example (2.54.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.54.0 keyboard_arrow_down
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]