-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathCommitResponse.php
More file actions
362 lines (325 loc) · 12.7 KB
/
CommitResponse.php
File metadata and controls
362 lines (325 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/spanner/v1/commit_response.proto
namespace Google\Cloud\Spanner\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* The response for [Commit][google.spanner.v1.Spanner.Commit].
*
* Generated from protobuf message <code>google.spanner.v1.CommitResponse</code>
*/
class CommitResponse extends \Google\Protobuf\Internal\Message
{
/**
* The Cloud Spanner timestamp at which the transaction committed.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp commit_timestamp = 1;</code>
*/
protected $commit_timestamp = null;
/**
* The statistics about this `Commit`. Not returned by default.
* For more information, see
* [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
*
* Generated from protobuf field <code>.google.spanner.v1.CommitResponse.CommitStats commit_stats = 2;</code>
*/
protected $commit_stats = null;
/**
* If `TransactionOptions.isolation_level` is set to
* `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the
* timestamp at which all reads in the transaction ran. This timestamp is
* never returned.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp snapshot_timestamp = 5;</code>
*/
protected $snapshot_timestamp = null;
/**
* Optional. A cache update expresses a set of changes the client should
* incorporate into its location cache. The client should discard the changes
* if they are older than the data it already has. This data can be obtained
* in response to requests that included a `RoutingHint` field, but may also
* be obtained by explicit location-fetching RPCs which may be added in the
* future.
*
* Generated from protobuf field <code>.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $cache_update = null;
/**
* The isolation level used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 7;</code>
*/
protected $isolation_level = 0;
/**
* The read lock mode used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode read_lock_mode = 8;</code>
*/
protected $read_lock_mode = 0;
protected $MultiplexedSessionRetry;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Protobuf\Timestamp $commit_timestamp
* The Cloud Spanner timestamp at which the transaction committed.
* @type \Google\Cloud\Spanner\V1\CommitResponse\CommitStats $commit_stats
* The statistics about this `Commit`. Not returned by default.
* For more information, see
* [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
* @type \Google\Cloud\Spanner\V1\MultiplexedSessionPrecommitToken $precommit_token
* If specified, transaction has not committed yet.
* You must retry the commit with the new precommit token.
* @type \Google\Protobuf\Timestamp $snapshot_timestamp
* If `TransactionOptions.isolation_level` is set to
* `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the
* timestamp at which all reads in the transaction ran. This timestamp is
* never returned.
* @type \Google\Cloud\Spanner\V1\CacheUpdate $cache_update
* Optional. A cache update expresses a set of changes the client should
* incorporate into its location cache. The client should discard the changes
* if they are older than the data it already has. This data can be obtained
* in response to requests that included a `RoutingHint` field, but may also
* be obtained by explicit location-fetching RPCs which may be added in the
* future.
* @type int $isolation_level
* The isolation level used for the read-write transaction.
* @type int $read_lock_mode
* The read lock mode used for the read-write transaction.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Spanner\V1\CommitResponse::initOnce();
parent::__construct($data);
}
/**
* The Cloud Spanner timestamp at which the transaction committed.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp commit_timestamp = 1;</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getCommitTimestamp()
{
return $this->commit_timestamp;
}
public function hasCommitTimestamp()
{
return isset($this->commit_timestamp);
}
public function clearCommitTimestamp()
{
unset($this->commit_timestamp);
}
/**
* The Cloud Spanner timestamp at which the transaction committed.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp commit_timestamp = 1;</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setCommitTimestamp($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->commit_timestamp = $var;
return $this;
}
/**
* The statistics about this `Commit`. Not returned by default.
* For more information, see
* [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
*
* Generated from protobuf field <code>.google.spanner.v1.CommitResponse.CommitStats commit_stats = 2;</code>
* @return \Google\Cloud\Spanner\V1\CommitResponse\CommitStats|null
*/
public function getCommitStats()
{
return $this->commit_stats;
}
public function hasCommitStats()
{
return isset($this->commit_stats);
}
public function clearCommitStats()
{
unset($this->commit_stats);
}
/**
* The statistics about this `Commit`. Not returned by default.
* For more information, see
* [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
*
* Generated from protobuf field <code>.google.spanner.v1.CommitResponse.CommitStats commit_stats = 2;</code>
* @param \Google\Cloud\Spanner\V1\CommitResponse\CommitStats $var
* @return $this
*/
public function setCommitStats($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\CommitResponse\CommitStats::class);
$this->commit_stats = $var;
return $this;
}
/**
* If specified, transaction has not committed yet.
* You must retry the commit with the new precommit token.
*
* Generated from protobuf field <code>.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 4;</code>
* @return \Google\Cloud\Spanner\V1\MultiplexedSessionPrecommitToken|null
*/
public function getPrecommitToken()
{
return $this->readOneof(4);
}
public function hasPrecommitToken()
{
return $this->hasOneof(4);
}
/**
* If specified, transaction has not committed yet.
* You must retry the commit with the new precommit token.
*
* Generated from protobuf field <code>.google.spanner.v1.MultiplexedSessionPrecommitToken precommit_token = 4;</code>
* @param \Google\Cloud\Spanner\V1\MultiplexedSessionPrecommitToken $var
* @return $this
*/
public function setPrecommitToken($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\MultiplexedSessionPrecommitToken::class);
$this->writeOneof(4, $var);
return $this;
}
/**
* If `TransactionOptions.isolation_level` is set to
* `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the
* timestamp at which all reads in the transaction ran. This timestamp is
* never returned.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp snapshot_timestamp = 5;</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getSnapshotTimestamp()
{
return $this->snapshot_timestamp;
}
public function hasSnapshotTimestamp()
{
return isset($this->snapshot_timestamp);
}
public function clearSnapshotTimestamp()
{
unset($this->snapshot_timestamp);
}
/**
* If `TransactionOptions.isolation_level` is set to
* `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the
* timestamp at which all reads in the transaction ran. This timestamp is
* never returned.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp snapshot_timestamp = 5;</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setSnapshotTimestamp($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->snapshot_timestamp = $var;
return $this;
}
/**
* Optional. A cache update expresses a set of changes the client should
* incorporate into its location cache. The client should discard the changes
* if they are older than the data it already has. This data can be obtained
* in response to requests that included a `RoutingHint` field, but may also
* be obtained by explicit location-fetching RPCs which may be added in the
* future.
*
* Generated from protobuf field <code>.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return \Google\Cloud\Spanner\V1\CacheUpdate|null
*/
public function getCacheUpdate()
{
return $this->cache_update;
}
public function hasCacheUpdate()
{
return isset($this->cache_update);
}
public function clearCacheUpdate()
{
unset($this->cache_update);
}
/**
* Optional. A cache update expresses a set of changes the client should
* incorporate into its location cache. The client should discard the changes
* if they are older than the data it already has. This data can be obtained
* in response to requests that included a `RoutingHint` field, but may also
* be obtained by explicit location-fetching RPCs which may be added in the
* future.
*
* Generated from protobuf field <code>.google.spanner.v1.CacheUpdate cache_update = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param \Google\Cloud\Spanner\V1\CacheUpdate $var
* @return $this
*/
public function setCacheUpdate($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Spanner\V1\CacheUpdate::class);
$this->cache_update = $var;
return $this;
}
/**
* The isolation level used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 7;</code>
* @return int
*/
public function getIsolationLevel()
{
return $this->isolation_level;
}
/**
* The isolation level used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.IsolationLevel isolation_level = 7;</code>
* @param int $var
* @return $this
*/
public function setIsolationLevel($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Spanner\V1\TransactionOptions\IsolationLevel::class);
$this->isolation_level = $var;
return $this;
}
/**
* The read lock mode used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode read_lock_mode = 8;</code>
* @return int
*/
public function getReadLockMode()
{
return $this->read_lock_mode;
}
/**
* The read lock mode used for the read-write transaction.
*
* Generated from protobuf field <code>.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode read_lock_mode = 8;</code>
* @param int $var
* @return $this
*/
public function setReadLockMode($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Spanner\V1\TransactionOptions\ReadWrite\ReadLockMode::class);
$this->read_lock_mode = $var;
return $this;
}
/**
* @return string
*/
public function getMultiplexedSessionRetry()
{
return $this->whichOneof("MultiplexedSessionRetry");
}
}