Class Glossary.LanguageCodePair (2.23.0)

public static final class Glossary.LanguageCodePair extends GeneratedMessageV3 implements Glossary.LanguageCodePairOrBuilder

Used with unidirectional glossaries.

Protobuf type google.cloud.translation.v3beta1.Glossary.LanguageCodePair

Static Fields

SOURCE_LANGUAGE_CODE_FIELD_NUMBER

public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_LANGUAGE_CODE_FIELD_NUMBER

public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Glossary.LanguageCodePair getDefaultInstance()
Returns
TypeDescription
Glossary.LanguageCodePair

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Glossary.LanguageCodePair.Builder newBuilder()
Returns
TypeDescription
Glossary.LanguageCodePair.Builder

newBuilder(Glossary.LanguageCodePair prototype)

public static Glossary.LanguageCodePair.Builder newBuilder(Glossary.LanguageCodePair prototype)
Parameter
NameDescription
prototypeGlossary.LanguageCodePair
Returns
TypeDescription
Glossary.LanguageCodePair.Builder

parseDelimitedFrom(InputStream input)

public static Glossary.LanguageCodePair parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Glossary.LanguageCodePair parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Glossary.LanguageCodePair parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Glossary.LanguageCodePair parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Glossary.LanguageCodePair parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Glossary.LanguageCodePair parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Glossary.LanguageCodePair parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Glossary.LanguageCodePair
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Glossary.LanguageCodePair> parser()
Returns
TypeDescription
Parser<LanguageCodePair>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Glossary.LanguageCodePair getDefaultInstanceForType()
Returns
TypeDescription
Glossary.LanguageCodePair

getParserForType()

public Parser<Glossary.LanguageCodePair> getParserForType()
Returns
TypeDescription
Parser<LanguageCodePair>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSourceLanguageCode()

public String getSourceLanguageCode()

Required. The BCP-47 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code.

string source_language_code = 1;

Returns
TypeDescription
String

The sourceLanguageCode.

getSourceLanguageCodeBytes()

public ByteString getSourceLanguageCodeBytes()

Required. The BCP-47 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code.

string source_language_code = 1;

Returns
TypeDescription
ByteString

The bytes for sourceLanguageCode.

getTargetLanguageCode()

public String getTargetLanguageCode()

Required. The BCP-47 language code for translation output, for example, "zh-CN". Expected to be an exact match for GlossaryTerm.language_code.

string target_language_code = 2;

Returns
TypeDescription
String

The targetLanguageCode.

getTargetLanguageCodeBytes()

public ByteString getTargetLanguageCodeBytes()

Required. The BCP-47 language code for translation output, for example, "zh-CN". Expected to be an exact match for GlossaryTerm.language_code.

string target_language_code = 2;

Returns
TypeDescription
ByteString

The bytes for targetLanguageCode.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Glossary.LanguageCodePair.Builder newBuilderForType()
Returns
TypeDescription
Glossary.LanguageCodePair.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Glossary.LanguageCodePair.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Glossary.LanguageCodePair.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Glossary.LanguageCodePair.Builder toBuilder()
Returns
TypeDescription
Glossary.LanguageCodePair.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException