@@ -18,6 +18,7 @@ package google.spanner.v1;
1818
1919import "google/api/field_behavior.proto" ;
2020import "google/protobuf/struct.proto" ;
21+ import "google/protobuf/timestamp.proto" ;
2122import "google/spanner/v1/keys.proto" ;
2223
2324option csharp_namespace = "Google.Cloud.Spanner.V1" ;
@@ -75,6 +76,40 @@ message Mutation {
7576 KeySet key_set = 2 [(google.api.field_behavior ) = REQUIRED ];
7677 }
7778
79+ // Arguments to [send][google.spanner.v1.Mutation.send] operations.
80+ message Send {
81+ // Required. The queue to which the message will be sent.
82+ string queue = 1 [(google.api.field_behavior ) = REQUIRED ];
83+
84+ // Required. The primary key of the message to be sent.
85+ google.protobuf.ListValue key = 2 [(google.api.field_behavior ) = REQUIRED ];
86+
87+ // The time at which Spanner will begin attempting to deliver the message.
88+ // If `deliver_time` is not set, Spanner will deliver the message
89+ // immediately. If `deliver_time` is in the past, Spanner will replace it
90+ // with a value closer to the current time.
91+ google.protobuf.Timestamp deliver_time = 3 ;
92+
93+ // The payload of the message.
94+ google.protobuf.Value payload = 4 ;
95+ }
96+
97+ // Arguments to [ack][google.spanner.v1.Mutation.ack] operations.
98+ message Ack {
99+ // Required. The queue where the message to be acked is stored.
100+ string queue = 1 [(google.api.field_behavior ) = REQUIRED ];
101+
102+ // Required. The primary key of the message to be acked.
103+ google.protobuf.ListValue key = 2 [(google.api.field_behavior ) = REQUIRED ];
104+
105+ // By default, an attempt to ack a message that does not exist will fail
106+ // with a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack
107+ // will succeed even if the message does not exist. This is useful for
108+ // unconditionally acking a message, even if it is missing or has already
109+ // been acked.
110+ bool ignore_not_found = 3 ;
111+ }
112+
78113 // Required. The operation to perform.
79114 oneof operation {
80115 // Insert new rows in a table. If any of the rows already exist,
@@ -111,5 +146,11 @@ message Mutation {
111146 // Delete rows from a table. Succeeds whether or not the named
112147 // rows were present.
113148 Delete delete = 5 ;
149+
150+ // Send a message to a queue.
151+ Send send = 6 ;
152+
153+ // Ack a message from a queue.
154+ Ack ack = 7 ;
114155 }
115156}
0 commit comments