public final class Document extends GeneratedMessageV3 implements DocumentOrBuilder
A Firestore document. Must not exceed 1 MiB - 4 bytes.Protobuf type
google.firestore.v1beta1.Document| Modifier and Type | Class and Description |
|---|---|
static class |
Document.Builder
A Firestore document.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
FIELDS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
UPDATE_TIME_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFieldsmemoizedSizememoizedHashCode| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFields(java.lang.String key)
The document's fields.
|
boolean |
equals(java.lang.Object obj) |
Timestamp |
getCreateTime()
Output only.
|
TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
static Document |
getDefaultInstance() |
Document |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
java.util.Map<java.lang.String,Value> |
getFields()
Deprecated.
|
int |
getFieldsCount()
The document's fields.
|
java.util.Map<java.lang.String,Value> |
getFieldsMap()
The document's fields.
|
Value |
getFieldsOrDefault(java.lang.String key,
Value defaultValue)
The document's fields.
|
Value |
getFieldsOrThrow(java.lang.String key)
The document's fields.
|
java.lang.String |
getName()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
ByteString |
getNameBytes()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Parser<Document> |
getParserForType() |
int |
getSerializedSize() |
UnknownFieldSet |
getUnknownFields() |
Timestamp |
getUpdateTime()
Output only.
|
TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
boolean |
hasCreateTime()
Output only.
|
int |
hashCode() |
boolean |
hasUpdateTime()
Output only.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static Document.Builder |
newBuilder() |
static Document.Builder |
newBuilder(Document prototype) |
Document.Builder |
newBuilderForType() |
protected Document.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static Document |
parseDelimitedFrom(java.io.InputStream input) |
static Document |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Document |
parseFrom(byte[] data) |
static Document |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Document |
parseFrom(java.nio.ByteBuffer data) |
static Document |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static Document |
parseFrom(ByteString data) |
static Document |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Document |
parseFrom(CodedInputStream input) |
static Document |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Document |
parseFrom(java.io.InputStream input) |
static Document |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Document> |
parser() |
Document.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int FIELDS_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField in class GeneratedMessageV3protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3public java.lang.String getName()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;getName in interface DocumentOrBuilderpublic ByteString getNameBytes()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;getNameBytes in interface DocumentOrBuilderpublic int getFieldsCount()
DocumentOrBuilder
The document's fields.
The map keys represent field names.
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` or `_`. For example,
`foo_bar_17`.
Field names matching the regular expression `__.*__` are reserved. Reserved
field names are forbidden except in certain documented contexts. The map
keys, 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 the simple
or quoted field names of the containing fields, delimited by `.`. For
example, the structured field
`"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
represented by the field path `foo.x&y`.
Within a field path, 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.v1beta1.Value> fields = 2;getFieldsCount in interface DocumentOrBuilderpublic boolean containsFields(java.lang.String key)
The document's fields.
The map keys represent field names.
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` or `_`. For example,
`foo_bar_17`.
Field names matching the regular expression `__.*__` are reserved. Reserved
field names are forbidden except in certain documented contexts. The map
keys, 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 the simple
or quoted field names of the containing fields, delimited by `.`. For
example, the structured field
`"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
represented by the field path `foo.x&y`.
Within a field path, 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.v1beta1.Value> fields = 2;containsFields in interface DocumentOrBuilder@Deprecated public java.util.Map<java.lang.String,Value> getFields()
getFieldsMap() instead.getFields in interface DocumentOrBuilderpublic java.util.Map<java.lang.String,Value> getFieldsMap()
The document's fields.
The map keys represent field names.
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` or `_`. For example,
`foo_bar_17`.
Field names matching the regular expression `__.*__` are reserved. Reserved
field names are forbidden except in certain documented contexts. The map
keys, 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 the simple
or quoted field names of the containing fields, delimited by `.`. For
example, the structured field
`"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
represented by the field path `foo.x&y`.
Within a field path, 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.v1beta1.Value> fields = 2;getFieldsMap in interface DocumentOrBuilderpublic Value getFieldsOrDefault(java.lang.String key, Value defaultValue)
The document's fields.
The map keys represent field names.
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` or `_`. For example,
`foo_bar_17`.
Field names matching the regular expression `__.*__` are reserved. Reserved
field names are forbidden except in certain documented contexts. The map
keys, 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 the simple
or quoted field names of the containing fields, delimited by `.`. For
example, the structured field
`"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
represented by the field path `foo.x&y`.
Within a field path, 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.v1beta1.Value> fields = 2;getFieldsOrDefault in interface DocumentOrBuilderpublic Value getFieldsOrThrow(java.lang.String key)
The document's fields.
The map keys represent field names.
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` or `_`. For example,
`foo_bar_17`.
Field names matching the regular expression `__.*__` are reserved. Reserved
field names are forbidden except in certain documented contexts. The map
keys, 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 the simple
or quoted field names of the containing fields, delimited by `.`. For
example, the structured field
`"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
represented by the field path `foo.x&y`.
Within a field path, 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.v1beta1.Value> fields = 2;getFieldsOrThrow in interface DocumentOrBuilderpublic 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;hasCreateTime in interface DocumentOrBuilderpublic 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;getCreateTime in interface DocumentOrBuilderpublic 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;getCreateTimeOrBuilder in interface DocumentOrBuilderpublic boolean hasUpdateTime()
Output only. The time at which the document was last changed. This value is initally 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;hasUpdateTime in interface DocumentOrBuilderpublic Timestamp getUpdateTime()
Output only. The time at which the document was last changed. This value is initally 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;getUpdateTime in interface DocumentOrBuilderpublic TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. The time at which the document was last changed. This value is initally 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;getUpdateTimeOrBuilder in interface DocumentOrBuilderpublic final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo in interface MessageLitewriteTo in class GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface Messageequals in class AbstractMessagepublic int hashCode()
hashCode in interface MessagehashCode in class AbstractMessagepublic static Document parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Document parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Document parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Document parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Document parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Document parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Document parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Document.Builder newBuilderForType()
newBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Document.Builder newBuilder()
public static Document.Builder newBuilder(Document prototype)
public Document.Builder toBuilder()
toBuilder in interface MessagetoBuilder in interface MessageLiteprotected Document.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class GeneratedMessageV3public static Document getDefaultInstance()
public Parser<Document> getParserForType()
getParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessageV3public Document getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder