public static final class Document.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder
A Firestore document. Must not exceed 1 MiB - 4 bytes.Protobuf type
google.firestore.v1.Document
Modifier and Type | Method and Description |
---|---|
Document.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Document |
build() |
Document |
buildPartial() |
Document.Builder |
clear() |
Document.Builder |
clearCreateTime()
Output only.
|
Document.Builder |
clearField(com.google.protobuf.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(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Document.Builder |
clearUpdateTime()
Output only.
|
Document.Builder |
clone() |
boolean |
containsFields(String key)
The document's fields.
|
com.google.protobuf.Timestamp |
getCreateTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getCreateTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getCreateTimeOrBuilder()
Output only.
|
Document |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,Value> |
getFields()
Deprecated.
|
int |
getFieldsCount()
The document's fields.
|
Map<String,Value> |
getFieldsMap()
The document's fields.
|
Value |
getFieldsOrDefault(String key,
Value defaultValue)
The document's fields.
|
Value |
getFieldsOrThrow(String key)
The document's fields.
|
Map<String,Value> |
getMutableFields()
Deprecated.
|
String |
getName()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
com.google.protobuf.ByteString |
getNameBytes()
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
com.google.protobuf.Timestamp |
getUpdateTime()
Output only.
|
com.google.protobuf.Timestamp.Builder |
getUpdateTimeBuilder()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
boolean |
hasCreateTime()
Output only.
|
boolean |
hasUpdateTime()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Document.Builder |
mergeCreateTime(com.google.protobuf.Timestamp value)
Output only.
|
Document.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Document.Builder |
mergeFrom(Document other) |
Document.Builder |
mergeFrom(com.google.protobuf.Message other) |
Document.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Document.Builder |
mergeUpdateTime(com.google.protobuf.Timestamp value)
Output only.
|
Document.Builder |
putAllFields(Map<String,Value> values)
The document's fields.
|
Document.Builder |
putFields(String key,
Value value)
The document's fields.
|
Document.Builder |
removeFields(String key)
The document's fields.
|
Document.Builder |
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
Document.Builder |
setCreateTime(com.google.protobuf.Timestamp value)
Output only.
|
Document.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Document.Builder |
setName(String value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Document.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The resource name of the document, for example
`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
Document.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Document.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Document.Builder |
setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only.
|
Document.Builder |
setUpdateTime(com.google.protobuf.Timestamp value)
Output only.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public Document build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public Document buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public Document.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Document.Builder>
public Document.Builder mergeFrom(Document other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public Document.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Document.Builder>
IOException
public 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 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;
getNameBytes
in interface DocumentOrBuilder
public Document.Builder setName(String value)
The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;
value
- The name to set.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(com.google.protobuf.ByteString value)
The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string name = 1;
value
- The bytes for name to set.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`. 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.v1.Value> fields = 2;
getFieldsCount
in interface DocumentOrBuilder
public boolean containsFields(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`. 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.v1.Value> fields = 2;
containsFields
in interface DocumentOrBuilder
@Deprecated public Map<String,Value> getFields()
getFieldsMap()
instead.getFields
in interface DocumentOrBuilder
public Map<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`. 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.v1.Value> fields = 2;
getFieldsMap
in interface DocumentOrBuilder
public Value getFieldsOrDefault(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`. 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.v1.Value> fields = 2;
getFieldsOrDefault
in interface DocumentOrBuilder
public Value getFieldsOrThrow(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`. 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.v1.Value> fields = 2;
getFieldsOrThrow
in interface DocumentOrBuilder
public Document.Builder clearFields()
public Document.Builder removeFields(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`. 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.v1.Value> fields = 2;
@Deprecated public Map<String,Value> getMutableFields()
public Document.Builder putFields(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`. 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.v1.Value> fields = 2;
public Document.Builder putAllFields(Map<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`. 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.v1.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 DocumentOrBuilder
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;
getCreateTime
in interface DocumentOrBuilder
public Document.Builder setCreateTime(com.google.protobuf.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(com.google.protobuf.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(com.google.protobuf.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 com.google.protobuf.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 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;
getCreateTimeOrBuilder
in interface DocumentOrBuilder
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;
hasUpdateTime
in interface DocumentOrBuilder
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;
getUpdateTime
in interface DocumentOrBuilder
public Document.Builder setUpdateTime(com.google.protobuf.Timestamp value)
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;
public Document.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
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;
public Document.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
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;
public Document.Builder clearUpdateTime()
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;
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
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;
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;
getUpdateTimeOrBuilder
in interface DocumentOrBuilder
public final Document.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
public final Document.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Builder>
Copyright © 2023 Google LLC. All rights reserved.