@@ -282,14 +282,20 @@ message Precondition {
282282// WriteRelationshipsRequest contains a list of Relationship mutations that
283283// should be applied to the service. If the optional_preconditions parameter
284284// is included, all of the specified preconditions must also be satisfied before
285- // the write will be committed.
285+ // the write will be committed. All updates will be applied transactionally,
286+ // and if any preconditions fail, the entire transaction will be reverted.
286287message WriteRelationshipsRequest {
287288 repeated RelationshipUpdate updates = 1
288289 [ (validate.rules ).repeated .items .message.required = true ];
289290
290291 repeated Precondition optional_preconditions = 2
291292 [ (validate.rules ).repeated .items .message.required =
292293 true ]; // To be bounded by configuration
294+
295+ // optional_transaction_metadata is an optional field that can be used to store metadata about the transaction.
296+ // If specified, this metadata will be supplied in the WatchResponse for the updates associated with this
297+ // transaction.
298+ google.protobuf.Struct optional_transaction_metadata = 3 [ (validate.rules ) .message.required = false ];
293299}
294300
295301message WriteRelationshipsResponse { ZedToken written_at = 1 ; }
@@ -317,6 +323,11 @@ message DeleteRelationshipsRequest {
317323 // optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
318324 // relationships up to the count specified in optional_limit, and no more.
319325 bool optional_allow_partial_deletions = 4 ;
326+
327+ // optional_transaction_metadata is an optional field that can be used to store metadata about the transaction.
328+ // If specified, this metadata will be supplied in the WatchResponse for the deletions associated with
329+ // this transaction.
330+ google.protobuf.Struct optional_transaction_metadata = 5 [ (validate.rules ) .message.required = false ];
320331}
321332
322333message DeleteRelationshipsResponse {
@@ -662,6 +673,11 @@ message ResolvedSubject {
662673message ImportBulkRelationshipsRequest {
663674 repeated Relationship relationships = 1
664675 [ (validate.rules ).repeated .items .message.required = true ];
676+
677+ // optional_transaction_metadata is an optional field that can be used to store metadata about the transaction.
678+ // If specified, this metadata will be supplied in the WatchResponse for the creations associated with
679+ // this transaction.
680+ google.protobuf.Struct optional_transaction_metadata = 2 [ (validate.rules ) .message.required = false ];
665681}
666682
667683// ImportBulkRelationshipsResponse is returned on successful completion of the
0 commit comments