NAME
Google::Firestore::V1::Write - Compiled Protocol Buffers messages for google/firestore/v1/write.proto
SYNOPSIS
use Google::Firestore::V1::Write;
my $msg = Google::Firestore::V1::Write::Write->new({
update => $update,
delete => $delete,
transform => $transform,
update_mask => $update_mask,
});
# Read or update a field
my $val = $msg->update();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Firestore::V1::Write::Write->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/firestore/v1/write.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Firestore::V1::Write::Write
A write on a document.
Inherits from Protobuf::Message.
Accessors
$msg->update()/$msg->update($value)Type:
Message(Google::Firestore::V1::Document::Document)A document to write.
$msg->delete()/$msg->delete($value)Type:
StringA document name to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
$msg->transform()/$msg->transform($value)Type:
Message(Google::Firestore::V1::Write::DocumentTransform)Applies a transformation to a document.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Firestore::V1::Common::DocumentMask)The fields to update in this write.
This field can be set only when the operation is `update`. If the mask is not set for an `update` and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.
$msg->update_transforms()/$msg->update_transforms($value)Type:
Message(Google::Firestore::V1::Write::DocumentTransform::FieldTransform)The transforms to perform after update.
This field can be set only when the operation is `update`. If present, this write is equivalent to performing `update` and `transform` to the same document atomically and in order.
$msg->current_document()/$msg->current_document($value)Type:
Message(Google::Firestore::V1::Common::Precondition)An optional precondition on the document.
The write will fail if this is set and not met by the target document.
Google::Firestore::V1::Write::DocumentTransform
A transformation of a document.
Inherits from Protobuf::Message.
Accessors
$msg->document()/$msg->document($value)Type:
StringThe name of the document to transform.
$msg->field_transforms()/$msg->field_transforms($value)Type:
Message(Google::Firestore::V1::Write::DocumentTransform::FieldTransform)The list of transformations to apply to the fields of the document, in order. This must not be empty.
Google::Firestore::V1::Write::WriteResult
The result of applying a write.
Inherits from Protobuf::Message.
Accessors
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The last update time of the document after applying the write. Not set after a `delete`.
If the write did not actually change the document, this will be the previous update_time.
$msg->transform_results()/$msg->transform_results($value)Type:
Message(Google::Firestore::V1::Document::Value)The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the same order.
Google::Firestore::V1::Write::DocumentChange
A [Document][google.firestore.v1.Document] has changed.
May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that ultimately resulted in a new value for the [Document][google.firestore.v1.Document].
Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical change, if multiple targets are affected.
Inherits from Protobuf::Message.
Accessors
$msg->document()/$msg->document($value)Type:
Message(Google::Firestore::V1::Document::Document)The new state of the [Document][google.firestore.v1.Document].
If `mask` is set, contains only fields that were updated or added.
$msg->target_ids()/$msg->target_ids($value)Type:
Int32A set of target IDs of targets that match this document.
$msg->removed_target_ids()/$msg->removed_target_ids($value)Type:
Int32A set of target IDs for targets that no longer match this document.
Google::Firestore::V1::Write::DocumentDelete
A [Document][google.firestore.v1.Document] has been deleted.
May be the result of multiple [writes][google.firestore.v1.Write], including updates, the last of which deleted the [Document][google.firestore.v1.Document].
Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical delete, if multiple targets are affected.
Inherits from Protobuf::Message.
Accessors
$msg->document()/$msg->document($value)Type:
StringThe resource name of the [Document][google.firestore.v1.Document] that was deleted.
$msg->removed_target_ids()/$msg->removed_target_ids($value)Type:
Int32A set of target IDs for targets that previously matched this entity.
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The read timestamp at which the delete was observed.
Greater or equal to the `commit_time` of the delete.
Google::Firestore::V1::Write::DocumentRemove
A [Document][google.firestore.v1.Document] has been removed from the view of the targets.
Sent if the document is no longer relevant to a target and is out of view. Can be sent instead of a DocumentDelete or a DocumentChange if the server can not send the new value of the document.
Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical write or delete, if multiple targets are affected.
Inherits from Protobuf::Message.
Accessors
$msg->document()/$msg->document($value)Type:
StringThe resource name of the [Document][google.firestore.v1.Document] that has gone out of view.
$msg->removed_target_ids()/$msg->removed_target_ids($value)Type:
Int32A set of target IDs for targets that previously matched this document.
$msg->read_time()/$msg->read_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)The read timestamp at which the remove was observed.
Greater or equal to the `commit_time` of the change/delete/remove.
Google::Firestore::V1::Write::ExistenceFilter
A digest of all the documents that match a given target.
Inherits from Protobuf::Message.
Accessors
$msg->target_id()/$msg->target_id($value)Type:
Int32The target ID to which this filter applies.
$msg->count()/$msg->count($value)Type:
Int32The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id].
If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target.
The client can use the `unchanged_names` bloom filter to assist with this determination by testing ALL the document names against the filter; if the document name is NOT in the filter, it means the document no longer matches the target.
$msg->unchanged_names()/$msg->unchanged_names($value)Type:
Message(Google::Firestore::V1::BloomFilter::BloomFilter)A bloom filter that, despite its name, contains the UTF-8 byte encodings of the resource names of ALL the documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync.
SEE ALSO
Protobuf, Protobuf::Message, Google::Firestore::V1::Write::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.