public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
A Firestore document. Must not exceed 1 MiB - 4 bytes.Protobuf type
google.firestore.v1beta1.Document| Modifier and Type | Method and Description |
|---|---|
Document.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Document |
build() |
Document |
buildPartial() |
Document.Builder |
clear() |
Document.Builder |
clearCreateTime()
Output only.
|
Document.Builder |
clearField(Descriptors.FieldDescriptor field) |
Document.Builder |
clearFields() |
Document.Builder |
clearName()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Document.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Document.Builder |
clearUpdateTime()
Output only.
|
Document.Builder |
clone() |
boolean |
containsFields(java.lang.String key)
The document's fields.
|
Timestamp |
getCreateTime()
Output only.
|
Timestamp.Builder |
getCreateTimeBuilder()
Output only.
|
TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
Document |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
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.util.Map<java.lang.String,Value> |
getMutableFields()
Deprecated.
|
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}`.
|
Timestamp |
getUpdateTime()
Output only.
|
Timestamp.Builder |
getUpdateTimeBuilder()
Output only.
|
TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
boolean |
hasCreateTime()
Output only.
|
boolean |
hasUpdateTime()
Output only.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
protected MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Document.Builder |
mergeCreateTime(Timestamp value)
Output only.
|
Document.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Document.Builder |
mergeFrom(Document other) |
Document.Builder |
mergeFrom(Message other) |
Document.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Document.Builder |
mergeUpdateTime(Timestamp value)
Output only.
|
Document.Builder |
putAllFields(java.util.Map<java.lang.String,Value> values)
The document's fields.
|
Document.Builder |
putFields(java.lang.String key,
Value value)
The document's fields.
|
Document.Builder |
removeFields(java.lang.String key)
The document's fields.
|
Document.Builder |
setCreateTime(Timestamp.Builder builderForValue)
Output only.
|
Document.Builder |
setCreateTime(Timestamp value)
Output only.
|
Document.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Document.Builder |
setName(java.lang.String value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Document.Builder |
setNameBytes(ByteString value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Document.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Document.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
Document.Builder |
setUpdateTime(Timestamp.Builder builderForValue)
Output only.
|
Document.Builder |
setUpdateTime(Timestamp value)
Output only.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField in class GeneratedMessageV3.Builder<Document.Builder>protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class GeneratedMessageV3.Builder<Document.Builder>protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder clear()
clear in interface Message.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<Document.Builder>public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class GeneratedMessageV3.Builder<Document.Builder>public Document getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic Document build()
build in interface Message.Builderbuild in interface MessageLite.Builderpublic Document buildPartial()
buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic Document.Builder clone()
clone in interface Message.Builderclone in interface MessageLite.Builderclone in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder clearField(Descriptors.FieldDescriptor field)
clearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface Message.BuilderaddRepeatedField in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder mergeFrom(Message other)
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<Document.Builder>public Document.Builder mergeFrom(Document other)
public final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3.Builder<Document.Builder>public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<Document.Builder>java.io.IOExceptionpublic 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 Document.Builder setName(java.lang.String value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;public Document.Builder clearName()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;public Document.Builder setNameBytes(ByteString value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;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 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 Document.Builder clearFields()
public Document.Builder removeFields(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;@Deprecated public java.util.Map<java.lang.String,Value> getMutableFields()
public Document.Builder putFields(java.lang.String key, Value value)
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;public Document.Builder putAllFields(java.util.Map<java.lang.String,Value> values)
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;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 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 Document.Builder setCreateTime(Timestamp value)
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;public Document.Builder setCreateTime(Timestamp.Builder builderForValue)
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;public Document.Builder mergeCreateTime(Timestamp value)
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;public Document.Builder clearCreateTime()
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;public Timestamp.Builder getCreateTimeBuilder()
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;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 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 Document.Builder setUpdateTime(Timestamp value)
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;public Document.Builder setUpdateTime(Timestamp.Builder builderForValue)
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;public Document.Builder mergeUpdateTime(Timestamp value)
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;public Document.Builder clearUpdateTime()
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;public Timestamp.Builder getUpdateTimeBuilder()
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;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 DocumentOrBuilderpublic final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields in interface Message.BuildersetUnknownFields in class GeneratedMessageV3.Builder<Document.Builder>public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<Document.Builder>