Class Value.Builder (3.2.0)

public static final class Value.Builder extends GeneratedMessageV3.Builder<Value.Builder> implements ValueOrBuilder

A message that can hold any of the supported value types.

Protobuf type google.firestore.v1.Value

Implements

ValueOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Value build()
Returns
TypeDescription
Value

buildPartial()

public Value buildPartial()
Returns
TypeDescription
Value

clear()

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

clearArrayValue()

public Value.Builder clearArrayValue()

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
Value.Builder

clearBooleanValue()

public Value.Builder clearBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearBytesValue()

public Value.Builder clearBytesValue()

A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

bytes bytes_value = 18;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearDoubleValue()

public Value.Builder clearDoubleValue()

A double value.

double double_value = 3;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Value.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Value.Builder
Overrides

clearGeoPointValue()

public Value.Builder clearGeoPointValue()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
Value.Builder

clearIntegerValue()

public Value.Builder clearIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearMapValue()

public Value.Builder clearMapValue()

A map value.

.google.firestore.v1.MapValue map_value = 6;

Returns
TypeDescription
Value.Builder

clearNullValue()

public Value.Builder clearNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReferenceValue()

public Value.Builder clearReferenceValue()

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearStringValue()

public Value.Builder clearStringValue()

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Returns
TypeDescription
Value.Builder

This builder for chaining.

clearTimestampValue()

public Value.Builder clearTimestampValue()

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
Value.Builder

clearValueType()

public Value.Builder clearValueType()
Returns
TypeDescription
Value.Builder

clone()

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

getArrayValue()

public ArrayValue getArrayValue()

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
ArrayValue

The arrayValue.

getArrayValueBuilder()

public ArrayValue.Builder getArrayValueBuilder()

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
ArrayValue.Builder

getArrayValueOrBuilder()

public ArrayValueOrBuilder getArrayValueOrBuilder()

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
ArrayValueOrBuilder

getBooleanValue()

public boolean getBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
TypeDescription
boolean

The booleanValue.

getBytesValue()

public ByteString getBytesValue()

A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

bytes bytes_value = 18;

Returns
TypeDescription
ByteString

The bytesValue.

getDefaultInstanceForType()

public Value getDefaultInstanceForType()
Returns
TypeDescription
Value

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDoubleValue()

public double getDoubleValue()

A double value.

double double_value = 3;

Returns
TypeDescription
double

The doubleValue.

getGeoPointValue()

public LatLng getGeoPointValue()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
com.google.type.LatLng

The geoPointValue.

getGeoPointValueBuilder()

public LatLng.Builder getGeoPointValueBuilder()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
com.google.type.LatLng.Builder

getGeoPointValueOrBuilder()

public LatLngOrBuilder getGeoPointValueOrBuilder()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
com.google.type.LatLngOrBuilder

getIntegerValue()

public long getIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
TypeDescription
long

The integerValue.

getMapValue()

public MapValue getMapValue()

A map value.

.google.firestore.v1.MapValue map_value = 6;

Returns
TypeDescription
MapValue

The mapValue.

getMapValueBuilder()

public MapValue.Builder getMapValueBuilder()

A map value.

.google.firestore.v1.MapValue map_value = 6;

Returns
TypeDescription
MapValue.Builder

getMapValueOrBuilder()

public MapValueOrBuilder getMapValueOrBuilder()

A map value.

.google.firestore.v1.MapValue map_value = 6;

Returns
TypeDescription
MapValueOrBuilder

getNullValue()

public NullValue getNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
NullValue

The nullValue.

getNullValueValue()

public int getNullValueValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for nullValue.

getReferenceValue()

public String getReferenceValue()

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Returns
TypeDescription
String

The referenceValue.

getReferenceValueBytes()

public ByteString getReferenceValueBytes()

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Returns
TypeDescription
ByteString

The bytes for referenceValue.

getStringValue()

public String getStringValue()

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Returns
TypeDescription
String

The stringValue.

getStringValueBytes()

public ByteString getStringValueBytes()

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Returns
TypeDescription
ByteString

The bytes for stringValue.

getTimestampValue()

public Timestamp getTimestampValue()

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
Timestamp

The timestampValue.

getTimestampValueBuilder()

public Timestamp.Builder getTimestampValueBuilder()

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
Builder

getTimestampValueOrBuilder()

public TimestampOrBuilder getTimestampValueOrBuilder()

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
TimestampOrBuilder

getValueTypeCase()

public Value.ValueTypeCase getValueTypeCase()
Returns
TypeDescription
Value.ValueTypeCase

hasArrayValue()

public boolean hasArrayValue()

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Returns
TypeDescription
boolean

Whether the arrayValue field is set.

hasBooleanValue()

public boolean hasBooleanValue()

A boolean value.

bool boolean_value = 1;

Returns
TypeDescription
boolean

Whether the booleanValue field is set.

hasBytesValue()

public boolean hasBytesValue()

A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

bytes bytes_value = 18;

Returns
TypeDescription
boolean

Whether the bytesValue field is set.

hasDoubleValue()

public boolean hasDoubleValue()

A double value.

double double_value = 3;

Returns
TypeDescription
boolean

Whether the doubleValue field is set.

hasGeoPointValue()

public boolean hasGeoPointValue()

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Returns
TypeDescription
boolean

Whether the geoPointValue field is set.

hasIntegerValue()

public boolean hasIntegerValue()

An integer value.

int64 integer_value = 2;

Returns
TypeDescription
boolean

Whether the integerValue field is set.

hasMapValue()

public boolean hasMapValue()

A map value.

.google.firestore.v1.MapValue map_value = 6;

Returns
TypeDescription
boolean

Whether the mapValue field is set.

hasNullValue()

public boolean hasNullValue()

A null value.

.google.protobuf.NullValue null_value = 11;

Returns
TypeDescription
boolean

Whether the nullValue field is set.

hasReferenceValue()

public boolean hasReferenceValue()

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Returns
TypeDescription
boolean

Whether the referenceValue field is set.

hasStringValue()

public boolean hasStringValue()

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Returns
TypeDescription
boolean

Whether the stringValue field is set.

hasTimestampValue()

public boolean hasTimestampValue()

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Returns
TypeDescription
boolean

Whether the timestampValue field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeArrayValue(ArrayValue value)

public Value.Builder mergeArrayValue(ArrayValue value)

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Parameter
NameDescription
valueArrayValue
Returns
TypeDescription
Value.Builder

mergeFrom(Value other)

public Value.Builder mergeFrom(Value other)
Parameter
NameDescription
otherValue
Returns
TypeDescription
Value.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGeoPointValue(LatLng value)

public Value.Builder mergeGeoPointValue(LatLng value)

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Parameter
NameDescription
valuecom.google.type.LatLng
Returns
TypeDescription
Value.Builder

mergeMapValue(MapValue value)

public Value.Builder mergeMapValue(MapValue value)

A map value.

.google.firestore.v1.MapValue map_value = 6;

Parameter
NameDescription
valueMapValue
Returns
TypeDescription
Value.Builder

mergeTimestampValue(Timestamp value)

public Value.Builder mergeTimestampValue(Timestamp value)

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Value.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setArrayValue(ArrayValue value)

public Value.Builder setArrayValue(ArrayValue value)

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Parameter
NameDescription
valueArrayValue
Returns
TypeDescription
Value.Builder

setArrayValue(ArrayValue.Builder builderForValue)

public Value.Builder setArrayValue(ArrayValue.Builder builderForValue)

An array value. Cannot directly contain another array value, though can contain an map which contains another array.

.google.firestore.v1.ArrayValue array_value = 9;

Parameter
NameDescription
builderForValueArrayValue.Builder
Returns
TypeDescription
Value.Builder

setBooleanValue(boolean value)

public Value.Builder setBooleanValue(boolean value)

A boolean value.

bool boolean_value = 1;

Parameter
NameDescription
valueboolean

The booleanValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setBytesValue(ByteString value)

public Value.Builder setBytesValue(ByteString value)

A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.

bytes bytes_value = 18;

Parameter
NameDescription
valueByteString

The bytesValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setDoubleValue(double value)

public Value.Builder setDoubleValue(double value)

A double value.

double double_value = 3;

Parameter
NameDescription
valuedouble

The doubleValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeoPointValue(LatLng value)

public Value.Builder setGeoPointValue(LatLng value)

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Parameter
NameDescription
valuecom.google.type.LatLng
Returns
TypeDescription
Value.Builder

setGeoPointValue(LatLng.Builder builderForValue)

public Value.Builder setGeoPointValue(LatLng.Builder builderForValue)

A geo point value representing a point on the surface of Earth.

.google.type.LatLng geo_point_value = 8;

Parameter
NameDescription
builderForValuecom.google.type.LatLng.Builder
Returns
TypeDescription
Value.Builder

setIntegerValue(long value)

public Value.Builder setIntegerValue(long value)

An integer value.

int64 integer_value = 2;

Parameter
NameDescription
valuelong

The integerValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setMapValue(MapValue value)

public Value.Builder setMapValue(MapValue value)

A map value.

.google.firestore.v1.MapValue map_value = 6;

Parameter
NameDescription
valueMapValue
Returns
TypeDescription
Value.Builder

setMapValue(MapValue.Builder builderForValue)

public Value.Builder setMapValue(MapValue.Builder builderForValue)

A map value.

.google.firestore.v1.MapValue map_value = 6;

Parameter
NameDescription
builderForValueMapValue.Builder
Returns
TypeDescription
Value.Builder

setNullValue(NullValue value)

public Value.Builder setNullValue(NullValue value)

A null value.

.google.protobuf.NullValue null_value = 11;

Parameter
NameDescription
valueNullValue

The nullValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setNullValueValue(int value)

public Value.Builder setNullValueValue(int value)

A null value.

.google.protobuf.NullValue null_value = 11;

Parameter
NameDescription
valueint

The enum numeric value on the wire for nullValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setReferenceValue(String value)

public Value.Builder setReferenceValue(String value)

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Parameter
NameDescription
valueString

The referenceValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setReferenceValueBytes(ByteString value)

public Value.Builder setReferenceValueBytes(ByteString value)

A reference to a document. For example: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string reference_value = 5;

Parameter
NameDescription
valueByteString

The bytes for referenceValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

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

public Value.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Value.Builder
Overrides

setStringValue(String value)

public Value.Builder setStringValue(String value)

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Parameter
NameDescription
valueString

The stringValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setStringValueBytes(ByteString value)

public Value.Builder setStringValueBytes(ByteString value)

A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries.

string string_value = 17;

Parameter
NameDescription
valueByteString

The bytes for stringValue to set.

Returns
TypeDescription
Value.Builder

This builder for chaining.

setTimestampValue(Timestamp value)

public Value.Builder setTimestampValue(Timestamp value)

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Value.Builder

setTimestampValue(Timestamp.Builder builderForValue)

public Value.Builder setTimestampValue(Timestamp.Builder builderForValue)

A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down.

.google.protobuf.Timestamp timestamp_value = 10;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Value.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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