Class LocalizedText.Builder (2.9.1)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LocalizedText.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
LocalizedText.Builder
Overrides

build()

public LocalizedText build()
Returns
TypeDescription
LocalizedText

buildPartial()

public LocalizedText buildPartial()
Returns
TypeDescription
LocalizedText

clear()

public LocalizedText.Builder clear()
Returns
TypeDescription
LocalizedText.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public LocalizedText.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
LocalizedText.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public LocalizedText.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
LocalizedText.Builder
Overrides

clearText()

public LocalizedText.Builder clearText()

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

string text = 1;

Returns
TypeDescription
LocalizedText.Builder

This builder for chaining.

clone()

public LocalizedText.Builder clone()
Returns
TypeDescription
LocalizedText.Builder
Overrides

getDefaultInstanceForType()

public LocalizedText getDefaultInstanceForType()
Returns
TypeDescription
LocalizedText

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LocalizedText.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LocalizedText.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public LocalizedText.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
LocalizedText.Builder
Overrides

mergeFrom(LocalizedText other)

public LocalizedText.Builder mergeFrom(LocalizedText other)
Parameter
NameDescription
otherLocalizedText
Returns
TypeDescription
LocalizedText.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LocalizedText.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
LocalizedText.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public LocalizedText.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The languageCode to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for languageCode to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The text to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for text to set.

Returns
TypeDescription
LocalizedText.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final LocalizedText.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
LocalizedText.Builder
Overrides