Class Value.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
com.google.firestore.v1.Value.Builder
All Implemented Interfaces:
ValueOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Value

public static final class Value.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder> implements ValueOrBuilder
 A message that can hold any of the supported value types.
 
Protobuf type google.firestore.v1.Value
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • clear

      public Value.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • getDefaultInstanceForType

      public Value getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Value build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Value buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Value.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • setField

      public Value.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • clearField

      public Value.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • clearOneof

      public Value.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • setRepeatedField

      public Value.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • addRepeatedField

      public Value.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • mergeFrom

      public Value.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Value.Builder>
    • mergeFrom

      public Value.Builder mergeFrom(Value other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • mergeFrom

      public Value.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Value.Builder>
      Throws:
      IOException
    • getValueTypeCase

      public Value.ValueTypeCase getValueTypeCase()
      Specified by:
      getValueTypeCase in interface ValueOrBuilder
    • clearValueType

      public Value.Builder clearValueType()
    • hasNullValue

      public boolean hasNullValue()
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Specified by:
      hasNullValue in interface ValueOrBuilder
      Returns:
      Whether the nullValue field is set.
    • getNullValueValue

      public int getNullValueValue()
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Specified by:
      getNullValueValue in interface ValueOrBuilder
      Returns:
      The enum numeric value on the wire for nullValue.
    • setNullValueValue

      public Value.Builder setNullValueValue(int value)
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Parameters:
      value - The enum numeric value on the wire for nullValue to set.
      Returns:
      This builder for chaining.
    • getNullValue

      public com.google.protobuf.NullValue getNullValue()
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Specified by:
      getNullValue in interface ValueOrBuilder
      Returns:
      The nullValue.
    • setNullValue

      public Value.Builder setNullValue(com.google.protobuf.NullValue value)
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Parameters:
      value - The nullValue to set.
      Returns:
      This builder for chaining.
    • clearNullValue

      public Value.Builder clearNullValue()
       A null value.
       
      .google.protobuf.NullValue null_value = 11;
      Returns:
      This builder for chaining.
    • hasBooleanValue

      public boolean hasBooleanValue()
       A boolean value.
       
      bool boolean_value = 1;
      Specified by:
      hasBooleanValue in interface ValueOrBuilder
      Returns:
      Whether the booleanValue field is set.
    • getBooleanValue

      public boolean getBooleanValue()
       A boolean value.
       
      bool boolean_value = 1;
      Specified by:
      getBooleanValue in interface ValueOrBuilder
      Returns:
      The booleanValue.
    • setBooleanValue

      public Value.Builder setBooleanValue(boolean value)
       A boolean value.
       
      bool boolean_value = 1;
      Parameters:
      value - The booleanValue to set.
      Returns:
      This builder for chaining.
    • clearBooleanValue

      public Value.Builder clearBooleanValue()
       A boolean value.
       
      bool boolean_value = 1;
      Returns:
      This builder for chaining.
    • hasIntegerValue

      public boolean hasIntegerValue()
       An integer value.
       
      int64 integer_value = 2;
      Specified by:
      hasIntegerValue in interface ValueOrBuilder
      Returns:
      Whether the integerValue field is set.
    • getIntegerValue

      public long getIntegerValue()
       An integer value.
       
      int64 integer_value = 2;
      Specified by:
      getIntegerValue in interface ValueOrBuilder
      Returns:
      The integerValue.
    • setIntegerValue

      public Value.Builder setIntegerValue(long value)
       An integer value.
       
      int64 integer_value = 2;
      Parameters:
      value - The integerValue to set.
      Returns:
      This builder for chaining.
    • clearIntegerValue

      public Value.Builder clearIntegerValue()
       An integer value.
       
      int64 integer_value = 2;
      Returns:
      This builder for chaining.
    • hasDoubleValue

      public boolean hasDoubleValue()
       A double value.
       
      double double_value = 3;
      Specified by:
      hasDoubleValue in interface ValueOrBuilder
      Returns:
      Whether the doubleValue field is set.
    • getDoubleValue

      public double getDoubleValue()
       A double value.
       
      double double_value = 3;
      Specified by:
      getDoubleValue in interface ValueOrBuilder
      Returns:
      The doubleValue.
    • setDoubleValue

      public Value.Builder setDoubleValue(double value)
       A double value.
       
      double double_value = 3;
      Parameters:
      value - The doubleValue to set.
      Returns:
      This builder for chaining.
    • clearDoubleValue

      public Value.Builder clearDoubleValue()
       A double value.
       
      double double_value = 3;
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasTimestampValue in interface ValueOrBuilder
      Returns:
      Whether the timestampValue field is set.
    • getTimestampValue

      public com.google.protobuf.Timestamp getTimestampValue()
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
      Specified by:
      getTimestampValue in interface ValueOrBuilder
      Returns:
      The timestampValue.
    • setTimestampValue

      public Value.Builder setTimestampValue(com.google.protobuf.Timestamp value)
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
    • setTimestampValue

      public Value.Builder setTimestampValue(com.google.protobuf.Timestamp.Builder builderForValue)
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
    • mergeTimestampValue

      public Value.Builder mergeTimestampValue(com.google.protobuf.Timestamp value)
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
    • 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;
    • getTimestampValueBuilder

      public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder()
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
    • getTimestampValueOrBuilder

      public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder()
       A timestamp value.
      
       Precise only to microseconds. When stored, any additional precision is
       rounded down.
       
      .google.protobuf.Timestamp timestamp_value = 10;
      Specified by:
      getTimestampValueOrBuilder in interface ValueOrBuilder
    • 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;
      Specified by:
      hasStringValue in interface ValueOrBuilder
      Returns:
      Whether the stringValue field is set.
    • 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;
      Specified by:
      getStringValue in interface ValueOrBuilder
      Returns:
      The stringValue.
    • getStringValueBytes

      public com.google.protobuf.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;
      Specified by:
      getStringValueBytes in interface ValueOrBuilder
      Returns:
      The bytes for stringValue.
    • setStringValue

      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;
      Parameters:
      value - The stringValue to set.
      Returns:
      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:
      This builder for chaining.
    • setStringValueBytes

      public Value.Builder setStringValueBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes for stringValue to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasBytesValue in interface ValueOrBuilder
      Returns:
      Whether the bytesValue field is set.
    • getBytesValue

      public com.google.protobuf.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;
      Specified by:
      getBytesValue in interface ValueOrBuilder
      Returns:
      The bytesValue.
    • setBytesValue

      public Value.Builder setBytesValue(com.google.protobuf.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;
      Parameters:
      value - The bytesValue to set.
      Returns:
      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:
      This builder for chaining.
    • hasReferenceValue

      public boolean hasReferenceValue()
       A reference to a document. For example:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string reference_value = 5;
      Specified by:
      hasReferenceValue in interface ValueOrBuilder
      Returns:
      Whether the referenceValue field is set.
    • getReferenceValue

      public String getReferenceValue()
       A reference to a document. For example:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string reference_value = 5;
      Specified by:
      getReferenceValue in interface ValueOrBuilder
      Returns:
      The referenceValue.
    • getReferenceValueBytes

      public com.google.protobuf.ByteString getReferenceValueBytes()
       A reference to a document. For example:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string reference_value = 5;
      Specified by:
      getReferenceValueBytes in interface ValueOrBuilder
      Returns:
      The bytes for referenceValue.
    • setReferenceValue

      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;
      Parameters:
      value - The referenceValue to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setReferenceValueBytes

      public Value.Builder setReferenceValueBytes(com.google.protobuf.ByteString value)
       A reference to a document. For example:
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string reference_value = 5;
      Parameters:
      value - The bytes for referenceValue to set.
      Returns:
      This builder for chaining.
    • hasGeoPointValue

      public boolean hasGeoPointValue()
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
      Specified by:
      hasGeoPointValue in interface ValueOrBuilder
      Returns:
      Whether the geoPointValue field is set.
    • getGeoPointValue

      public com.google.type.LatLng getGeoPointValue()
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
      Specified by:
      getGeoPointValue in interface ValueOrBuilder
      Returns:
      The geoPointValue.
    • setGeoPointValue

      public Value.Builder setGeoPointValue(com.google.type.LatLng value)
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
    • setGeoPointValue

      public Value.Builder setGeoPointValue(com.google.type.LatLng.Builder builderForValue)
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
    • mergeGeoPointValue

      public Value.Builder mergeGeoPointValue(com.google.type.LatLng value)
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
    • clearGeoPointValue

      public Value.Builder clearGeoPointValue()
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
    • getGeoPointValueBuilder

      public com.google.type.LatLng.Builder getGeoPointValueBuilder()
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
    • getGeoPointValueOrBuilder

      public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder()
       A geo point value representing a point on the surface of Earth.
       
      .google.type.LatLng geo_point_value = 8;
      Specified by:
      getGeoPointValueOrBuilder in interface ValueOrBuilder
    • 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;
      Specified by:
      hasArrayValue in interface ValueOrBuilder
      Returns:
      Whether the arrayValue field is set.
    • 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;
      Specified by:
      getArrayValue in interface ValueOrBuilder
      Returns:
      The arrayValue.
    • setArrayValue

      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;
    • setArrayValue

      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;
    • mergeArrayValue

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getArrayValueOrBuilder in interface ValueOrBuilder
    • hasMapValue

      public boolean hasMapValue()
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
      Specified by:
      hasMapValue in interface ValueOrBuilder
      Returns:
      Whether the mapValue field is set.
    • getMapValue

      public MapValue getMapValue()
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
      Specified by:
      getMapValue in interface ValueOrBuilder
      Returns:
      The mapValue.
    • setMapValue

      public Value.Builder setMapValue(MapValue value)
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
    • setMapValue

      public Value.Builder setMapValue(MapValue.Builder builderForValue)
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
    • mergeMapValue

      public Value.Builder mergeMapValue(MapValue value)
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
    • clearMapValue

      public Value.Builder clearMapValue()
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
    • getMapValueBuilder

      public MapValue.Builder getMapValueBuilder()
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
    • getMapValueOrBuilder

      public MapValueOrBuilder getMapValueOrBuilder()
       A map value.
       
      .google.firestore.v1.MapValue map_value = 6;
      Specified by:
      getMapValueOrBuilder in interface ValueOrBuilder
    • setUnknownFields

      public final Value.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>
    • mergeUnknownFields

      public final Value.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Value.Builder>