Class LocalizedText.Builder (2.40.0)

public static final class LocalizedText.Builder extends GeneratedMessageV3.Builder<LocalizedText.Builder> implements LocalizedTextOrBuilder

Localized variant of a text in a particular language.

Protobuf type google.type.LocalizedText

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LocalizedText build()
Returns
Type Description
LocalizedText

buildPartial()

public LocalizedText buildPartial()
Returns
Type Description
LocalizedText

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearLanguageCode()

public LocalizedText.Builder clearLanguageCode()

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
Type Description
LocalizedText.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearText()

public LocalizedText.Builder clearText()

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

string text = 1;

Returns
Type Description
LocalizedText.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public LocalizedText getDefaultInstanceForType()
Returns
Type Description
LocalizedText

getDescriptorForType()

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

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
Type Description
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
Type Description
ByteString

The bytes for languageCode.

getText()

public String getText()

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

string text = 1;

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

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

string text = 1;

Returns
Type Description
ByteString

The bytes for text.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(LocalizedText other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setLanguageCode(String value)

public LocalizedText.Builder setLanguageCode(String value)

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;

Parameter
Name Description
value String

The languageCode to set.

Returns
Type Description
LocalizedText.Builder

This builder for chaining.

setLanguageCodeBytes(ByteString value)

public LocalizedText.Builder setLanguageCodeBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for languageCode to set.

Returns
Type Description
LocalizedText.Builder

This builder for chaining.

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

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

setText(String value)

public LocalizedText.Builder setText(String value)

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

string text = 1;

Parameter
Name Description
value String

The text to set.

Returns
Type Description
LocalizedText.Builder

This builder for chaining.

setTextBytes(ByteString value)

public LocalizedText.Builder setTextBytes(ByteString value)

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

string text = 1;

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
LocalizedText.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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