Class LocalizedText (2.37.1)

public final class LocalizedText extends GeneratedMessageV3 implements LocalizedTextOrBuilder

Localized variant of a text in a particular language.

Protobuf type google.type.LocalizedText

Static Fields

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LocalizedText getDefaultInstance()
Returns
TypeDescription
LocalizedText

getDescriptor()

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

newBuilder()

public static LocalizedText.Builder newBuilder()
Returns
TypeDescription
LocalizedText.Builder

newBuilder(LocalizedText prototype)

public static LocalizedText.Builder newBuilder(LocalizedText prototype)
Parameter
NameDescription
prototypeLocalizedText
Returns
TypeDescription
LocalizedText.Builder

parseDelimitedFrom(InputStream input)

public static LocalizedText parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocalizedText
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static LocalizedText parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LocalizedText
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static LocalizedText parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LocalizedText
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static LocalizedText parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LocalizedText
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static LocalizedText parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LocalizedText
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<LocalizedText> parser()
Returns
TypeDescription
Parser<LocalizedText>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public LocalizedText getDefaultInstanceForType()
Returns
TypeDescription
LocalizedText

getLanguageCode()

public String getLanguageCode()

The text's BCP-47 language code, such as "en-US" or "sr-Latn".

For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 2;

Returns
TypeDescription
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

The text's BCP-47 language code, such as "en-US" or "sr-Latn".

For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

string language_code = 2;

Returns
TypeDescription
ByteString

The bytes for languageCode.

getParserForType()

public Parser<LocalizedText> getParserForType()
Returns
TypeDescription
Parser<LocalizedText>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getText()

public String getText()

Localized string in the language corresponding to `language_code' below.

string text = 1;

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

Localized string in the language corresponding to `language_code' below.

string text = 1;

Returns
TypeDescription
ByteString

The bytes for text.

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 LocalizedText.Builder newBuilderForType()
Returns
TypeDescription
LocalizedText.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public LocalizedText.Builder toBuilder()
Returns
TypeDescription
LocalizedText.Builder

writeTo(CodedOutputStream output)

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