Class Document

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.firestore.v1.Document
All Implemented Interfaces:
DocumentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class Document extends com.google.protobuf.GeneratedMessageV3 implements DocumentOrBuilder
 A Firestore document.

 Must not exceed 1 MiB - 4 bytes.
 
Protobuf type google.firestore.v1.Document
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A Firestore document.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

    com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    The document's fields.
    boolean
     
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    static Document
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    Deprecated.
    int
    The document's fields.
    The document's fields.
    getFieldsOrDefault(String key, Value defaultValue)
    The document's fields.
    The document's fields.
    The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
    com.google.protobuf.ByteString
    The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
    com.google.protobuf.Parser<Document>
     
    int
     
    com.google.protobuf.Timestamp
    Output only.
    com.google.protobuf.TimestampOrBuilder
    Output only.
    boolean
    Output only.
    int
     
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
    newBuilder(Document prototype)
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
    static Document
     
    static Document
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Document
    parseFrom(byte[] data)
     
    static Document
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Document
    parseFrom(com.google.protobuf.ByteString data)
     
    static Document
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Document
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Document
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Document
     
    static Document
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Document
     
    static Document
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Document>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getName

      public String getName()
       The resource name of the document, for example
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string name = 1;
      Specified by:
      getName in interface DocumentOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The resource name of the document, for example
       `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
       
      string name = 1;
      Specified by:
      getNameBytes in interface DocumentOrBuilder
      Returns:
      The bytes for name.
    • getFieldsCount

      public int getFieldsCount()
      Description copied from interface: DocumentOrBuilder
       The document's fields.
      
       The map keys represent field names.
      
       Field names matching the regular expression `__.*__` are reserved. Reserved
       field names are forbidden except in certain documented contexts. The field
       names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
       empty.
      
       Field paths may be used in other contexts to refer to structured fields
       defined here. For `map_value`, the field path is represented by a
       dot-delimited (`.`) string of segments. Each segment is either a simple
       field name (defined below) or a quoted field name. For example, the
       structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
       }}}` would be represented by the field path `` foo.`x&y` ``.
      
       A simple field name contains only characters `a` to `z`, `A` to `Z`,
       `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
       `foo_bar_17`.
      
       A quoted field name starts and ends with `` ` `` and
       may contain any character. Some characters, including `` ` ``, must be
       escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
       `` `bak\`tik` `` represents `` bak`tik ``.
       
      map<string, .google.firestore.v1.Value> fields = 2;
      Specified by:
      getFieldsCount in interface DocumentOrBuilder
    • containsFields

      public boolean containsFields(String key)
       The document's fields.
      
       The map keys represent field names.
      
       Field names matching the regular expression `__.*__` are reserved. Reserved
       field names are forbidden except in certain documented contexts. The field
       names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
       empty.
      
       Field paths may be used in other contexts to refer to structured fields
       defined here. For `map_value`, the field path is represented by a
       dot-delimited (`.`) string of segments. Each segment is either a simple
       field name (defined below) or a quoted field name. For example, the
       structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
       }}}` would be represented by the field path `` foo.`x&y` ``.
      
       A simple field name contains only characters `a` to `z`, `A` to `Z`,
       `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
       `foo_bar_17`.
      
       A quoted field name starts and ends with `` ` `` and
       may contain any character. Some characters, including `` ` ``, must be
       escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
       `` `bak\`tik` `` represents `` bak`tik ``.
       
      map<string, .google.firestore.v1.Value> fields = 2;
      Specified by:
      containsFields in interface DocumentOrBuilder
    • getFields

      @Deprecated public Map<String,Value> getFields()
      Deprecated.
      Use getFieldsMap() instead.
      Specified by:
      getFields in interface DocumentOrBuilder
    • getFieldsMap

      public Map<String,Value> getFieldsMap()
       The document's fields.
      
       The map keys represent field names.
      
       Field names matching the regular expression `__.*__` are reserved. Reserved
       field names are forbidden except in certain documented contexts. The field
       names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
       empty.
      
       Field paths may be used in other contexts to refer to structured fields
       defined here. For `map_value`, the field path is represented by a
       dot-delimited (`.`) string of segments. Each segment is either a simple
       field name (defined below) or a quoted field name. For example, the
       structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
       }}}` would be represented by the field path `` foo.`x&y` ``.
      
       A simple field name contains only characters `a` to `z`, `A` to `Z`,
       `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
       `foo_bar_17`.
      
       A quoted field name starts and ends with `` ` `` and
       may contain any character. Some characters, including `` ` ``, must be
       escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
       `` `bak\`tik` `` represents `` bak`tik ``.
       
      map<string, .google.firestore.v1.Value> fields = 2;
      Specified by:
      getFieldsMap in interface DocumentOrBuilder
    • getFieldsOrDefault

      public Value getFieldsOrDefault(String key, Value defaultValue)
       The document's fields.
      
       The map keys represent field names.
      
       Field names matching the regular expression `__.*__` are reserved. Reserved
       field names are forbidden except in certain documented contexts. The field
       names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
       empty.
      
       Field paths may be used in other contexts to refer to structured fields
       defined here. For `map_value`, the field path is represented by a
       dot-delimited (`.`) string of segments. Each segment is either a simple
       field name (defined below) or a quoted field name. For example, the
       structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
       }}}` would be represented by the field path `` foo.`x&y` ``.
      
       A simple field name contains only characters `a` to `z`, `A` to `Z`,
       `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
       `foo_bar_17`.
      
       A quoted field name starts and ends with `` ` `` and
       may contain any character. Some characters, including `` ` ``, must be
       escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
       `` `bak\`tik` `` represents `` bak`tik ``.
       
      map<string, .google.firestore.v1.Value> fields = 2;
      Specified by:
      getFieldsOrDefault in interface DocumentOrBuilder
    • getFieldsOrThrow

      public Value getFieldsOrThrow(String key)
       The document's fields.
      
       The map keys represent field names.
      
       Field names matching the regular expression `__.*__` are reserved. Reserved
       field names are forbidden except in certain documented contexts. The field
       names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
       empty.
      
       Field paths may be used in other contexts to refer to structured fields
       defined here. For `map_value`, the field path is represented by a
       dot-delimited (`.`) string of segments. Each segment is either a simple
       field name (defined below) or a quoted field name. For example, the
       structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
       }}}` would be represented by the field path `` foo.`x&y` ``.
      
       A simple field name contains only characters `a` to `z`, `A` to `Z`,
       `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
       `foo_bar_17`.
      
       A quoted field name starts and ends with `` ` `` and
       may contain any character. Some characters, including `` ` ``, must be
       escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
       `` `bak\`tik` `` represents `` bak`tik ``.
       
      map<string, .google.firestore.v1.Value> fields = 2;
      Specified by:
      getFieldsOrThrow in interface DocumentOrBuilder
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which the document was created.
      
       This value increases monotonically when a document is deleted then
       recreated. It can also be compared to values from other documents and
       the `read_time` of a query.
       
      .google.protobuf.Timestamp create_time = 3;
      Specified by:
      hasCreateTime in interface DocumentOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which the document was created.
      
       This value increases monotonically when a document is deleted then
       recreated. It can also be compared to values from other documents and
       the `read_time` of a query.
       
      .google.protobuf.Timestamp create_time = 3;
      Specified by:
      getCreateTime in interface DocumentOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which the document was created.
      
       This value increases monotonically when a document is deleted then
       recreated. It can also be compared to values from other documents and
       the `read_time` of a query.
       
      .google.protobuf.Timestamp create_time = 3;
      Specified by:
      getCreateTimeOrBuilder in interface DocumentOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time at which the document was last changed.
      
       This value is initially set to the `create_time` then increases
       monotonically with each change to the document. It can also be
       compared to values from other documents and the `read_time` of a query.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      hasUpdateTime in interface DocumentOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time at which the document was last changed.
      
       This value is initially set to the `create_time` then increases
       monotonically with each change to the document. It can also be
       compared to values from other documents and the `read_time` of a query.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      getUpdateTime in interface DocumentOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time at which the document was last changed.
      
       This value is initially set to the `create_time` then increases
       monotonically with each change to the document. It can also be
       compared to values from other documents and the `read_time` of a query.
       
      .google.protobuf.Timestamp update_time = 4;
      Specified by:
      getUpdateTimeOrBuilder in interface DocumentOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Document parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Document parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Document parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Document parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Document parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Document.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Document.Builder newBuilder()
    • newBuilder

      public static Document.Builder newBuilder(Document prototype)
    • toBuilder

      public Document.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Document.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Document getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Document> parser()
    • getParserForType

      public com.google.protobuf.Parser<Document> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Document getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder