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, unknownFields
memoizedSize
memoizedHashCode
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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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 MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
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;
hasCreateTime
in interface DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public 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 DocumentOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static Document parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Document parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Document parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Document parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Document parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Document parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Document parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Document.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Document.Builder newBuilder()
public static Document.Builder newBuilder(Document prototype)
public Document.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Document.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static Document getDefaultInstance()
public Parser<Document> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Document getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder