3 * Copyright 2007 Google Inc.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 # Generated by the protocol buffer compiler. DO NOT EDIT!
18 # source: google/appengine/datastore/datastore_v4.proto
21 require_once 'google/appengine/runtime/proto/ProtocolMessage.php';
22 require_once 'google/appengine/datastore/entity_v4_pb.php';
24 namespace google\appengine\datastore\v
4\Error
{
26 const BAD_REQUEST
= 1;
27 const CONCURRENT_TRANSACTION
= 2;
28 const INTERNAL_ERROR
= 3;
31 const PERMISSION_DENIED
= 6;
32 const BIGTABLE_ERROR
= 7;
33 const COMMITTED_BUT_STILL_APPLYING
= 8;
34 const CAPABILITY_DISABLED
= 9;
35 const TRY_ALTERNATE_BACKEND
= 10;
36 const SAFE_TIME_TOO_OLD
= 11;
39 namespace google\appengine\datastore\v
4 {
40 class Error
extends \google\net\ProtocolMessage
{
41 public function clear() {
43 public function byteSizePartial() {
47 public function outputPartial($out) {
49 public function tryMerge($d) {
50 while($d->avail() > 0) {
51 $tt = $d->getVarInt32();
54 throw new \google\net\
ProtocolBufferDecodeError();
61 public function checkInitialized() {
64 public function mergeFrom($x) {
65 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
67 public function equals($x) {
68 if ($x === $this) { return true; }
71 public function shortDebugString($prefix = "") {
77 namespace google\appengine\datastore\v
4\EntityResult
{
84 namespace google\appengine\datastore\v
4 {
85 class EntityResult
extends \google\net\ProtocolMessage
{
86 public function getEntity() {
87 if (!isset($this->entity
)) {
88 return new \google\appengine\datastore\v
4\
Entity();
92 public function mutableEntity() {
93 if (!isset($this->entity
)) {
94 $res = new \google\appengine\datastore\v
4\
Entity();
100 public function clearEntity() {
101 if (isset($this->entity
)) {
102 unset($this->entity
);
105 public function hasEntity() {
106 return isset($this->entity
);
108 public function getVersion() {
109 if (!isset($this->version
)) {
112 return $this->version
;
114 public function setVersion($val) {
115 if (is_double($val)) {
116 $this->version
= sprintf('%0.0F', $val);
118 $this->version
= $val;
122 public function clearVersion() {
123 unset($this->version
);
126 public function hasVersion() {
127 return isset($this->version
);
129 public function clear() {
130 $this->clearEntity();
131 $this->clearVersion();
133 public function byteSizePartial() {
135 if (isset($this->entity
)) {
137 $res +
= $this->lengthString($this->entity
->byteSizePartial());
139 if (isset($this->version
)) {
141 $res +
= $this->lengthVarInt64($this->version
);
145 public function outputPartial($out) {
146 if (isset($this->entity
)) {
147 $out->putVarInt32(10);
148 $out->putVarInt32($this->entity
->byteSizePartial());
149 $this->entity
->outputPartial($out);
151 if (isset($this->version
)) {
152 $out->putVarInt32(16);
153 $out->putVarInt64($this->version
);
156 public function tryMerge($d) {
157 while($d->avail() > 0) {
158 $tt = $d->getVarInt32();
161 $length = $d->getVarInt32();
162 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
164 $this->mutableEntity()->tryMerge($tmp);
167 $this->setVersion($d->getVarInt64());
170 throw new \google\net\
ProtocolBufferDecodeError();
177 public function checkInitialized() {
178 if ((!isset($this->entity
)) ||
(!$this->entity
->isInitialized())) return 'entity';
181 public function mergeFrom($x) {
182 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
183 if ($x->hasEntity()) {
184 $this->mutableEntity()->mergeFrom($x->getEntity());
186 if ($x->hasVersion()) {
187 $this->setVersion($x->getVersion());
190 public function equals($x) {
191 if ($x === $this) { return true; }
192 if (isset($this->entity
) !== isset($x->entity
)) return false;
193 if (isset($this->entity
) && !$this->entity
->equals($x->entity
)) return false;
194 if (isset($this->version
) !== isset($x->version
)) return false;
195 if (isset($this->version
) && !$this->integerEquals($this->version
, $x->version
)) return false;
198 public function shortDebugString($prefix = "") {
200 if (isset($this->entity
)) {
201 $res .= $prefix . "entity <\n" . $this->entity
->shortDebugString($prefix . " ") . $prefix . ">\n";
203 if (isset($this->version
)) {
204 $res .= $prefix . "version: " . $this->debugFormatInt64($this->version
) . "\n";
210 namespace google\appengine\datastore\v
4 {
211 class Query
extends \google\net\ProtocolMessage
{
212 private $projection = array();
213 private $kind = array();
214 private $order = array();
215 private $group_by = array();
216 public function getProjectionSize() {
217 return sizeof($this->projection
);
219 public function getProjectionList() {
220 return $this->projection
;
222 public function mutableProjection($idx) {
223 if (!isset($this->projection
[$idx])) {
224 $val = new \google\appengine\datastore\v
4\
PropertyExpression();
225 $this->projection
[$idx] = $val;
228 return $this->projection
[$idx];
230 public function getProjection($idx) {
231 if (isset($this->projection
[$idx])) {
232 return $this->projection
[$idx];
234 if ($idx >= end(array_keys($this->projection
))) {
235 throw new \
OutOfRangeException('index out of range: ' +
$idx);
237 return new \google\appengine\datastore\v
4\
PropertyExpression();
239 public function addProjection() {
240 $val = new \google\appengine\datastore\v
4\
PropertyExpression();
241 $this->projection
[] = $val;
244 public function clearProjection() {
245 $this->projection
= array();
247 public function getKindSize() {
248 return sizeof($this->kind
);
250 public function getKindList() {
253 public function mutableKind($idx) {
254 if (!isset($this->kind
[$idx])) {
255 $val = new \google\appengine\datastore\v
4\
KindExpression();
256 $this->kind
[$idx] = $val;
259 return $this->kind
[$idx];
261 public function getKind($idx) {
262 if (isset($this->kind
[$idx])) {
263 return $this->kind
[$idx];
265 if ($idx >= end(array_keys($this->kind
))) {
266 throw new \
OutOfRangeException('index out of range: ' +
$idx);
268 return new \google\appengine\datastore\v
4\
KindExpression();
270 public function addKind() {
271 $val = new \google\appengine\datastore\v
4\
KindExpression();
272 $this->kind
[] = $val;
275 public function clearKind() {
276 $this->kind
= array();
278 public function getFilter() {
279 if (!isset($this->filter
)) {
280 return new \google\appengine\datastore\v
4\
Filter();
282 return $this->filter
;
284 public function mutableFilter() {
285 if (!isset($this->filter
)) {
286 $res = new \google\appengine\datastore\v
4\
Filter();
287 $this->filter
= $res;
290 return $this->filter
;
292 public function clearFilter() {
293 if (isset($this->filter
)) {
294 unset($this->filter
);
297 public function hasFilter() {
298 return isset($this->filter
);
300 public function getOrderSize() {
301 return sizeof($this->order
);
303 public function getOrderList() {
306 public function mutableOrder($idx) {
307 if (!isset($this->order
[$idx])) {
308 $val = new \google\appengine\datastore\v
4\
PropertyOrder();
309 $this->order
[$idx] = $val;
312 return $this->order
[$idx];
314 public function getOrder($idx) {
315 if (isset($this->order
[$idx])) {
316 return $this->order
[$idx];
318 if ($idx >= end(array_keys($this->order
))) {
319 throw new \
OutOfRangeException('index out of range: ' +
$idx);
321 return new \google\appengine\datastore\v
4\
PropertyOrder();
323 public function addOrder() {
324 $val = new \google\appengine\datastore\v
4\
PropertyOrder();
325 $this->order
[] = $val;
328 public function clearOrder() {
329 $this->order
= array();
331 public function getGroupBySize() {
332 return sizeof($this->group_by
);
334 public function getGroupByList() {
335 return $this->group_by
;
337 public function mutableGroupBy($idx) {
338 if (!isset($this->group_by
[$idx])) {
339 $val = new \google\appengine\datastore\v
4\
PropertyReference();
340 $this->group_by
[$idx] = $val;
343 return $this->group_by
[$idx];
345 public function getGroupBy($idx) {
346 if (isset($this->group_by
[$idx])) {
347 return $this->group_by
[$idx];
349 if ($idx >= end(array_keys($this->group_by
))) {
350 throw new \
OutOfRangeException('index out of range: ' +
$idx);
352 return new \google\appengine\datastore\v
4\
PropertyReference();
354 public function addGroupBy() {
355 $val = new \google\appengine\datastore\v
4\
PropertyReference();
356 $this->group_by
[] = $val;
359 public function clearGroupBy() {
360 $this->group_by
= array();
362 public function getStartCursor() {
363 if (!isset($this->start_cursor
)) {
366 return $this->start_cursor
;
368 public function setStartCursor($val) {
369 $this->start_cursor
= $val;
372 public function clearStartCursor() {
373 unset($this->start_cursor
);
376 public function hasStartCursor() {
377 return isset($this->start_cursor
);
379 public function getEndCursor() {
380 if (!isset($this->end_cursor
)) {
383 return $this->end_cursor
;
385 public function setEndCursor($val) {
386 $this->end_cursor
= $val;
389 public function clearEndCursor() {
390 unset($this->end_cursor
);
393 public function hasEndCursor() {
394 return isset($this->end_cursor
);
396 public function getOffset() {
397 if (!isset($this->offset
)) {
400 return $this->offset
;
402 public function setOffset($val) {
403 $this->offset
= $val;
406 public function clearOffset() {
407 unset($this->offset
);
410 public function hasOffset() {
411 return isset($this->offset
);
413 public function getLimit() {
414 if (!isset($this->limit
)) {
419 public function setLimit($val) {
423 public function clearLimit() {
427 public function hasLimit() {
428 return isset($this->limit
);
430 public function clear() {
431 $this->clearProjection();
433 $this->clearFilter();
435 $this->clearGroupBy();
436 $this->clearStartCursor();
437 $this->clearEndCursor();
438 $this->clearOffset();
441 public function byteSizePartial() {
443 $this->checkProtoArray($this->projection
);
444 $res +
= 1 * sizeof($this->projection
);
445 foreach ($this->projection
as $value) {
446 $res +
= $this->lengthString($value->byteSizePartial());
448 $this->checkProtoArray($this->kind
);
449 $res +
= 1 * sizeof($this->kind
);
450 foreach ($this->kind
as $value) {
451 $res +
= $this->lengthString($value->byteSizePartial());
453 if (isset($this->filter
)) {
455 $res +
= $this->lengthString($this->filter
->byteSizePartial());
457 $this->checkProtoArray($this->order
);
458 $res +
= 1 * sizeof($this->order
);
459 foreach ($this->order
as $value) {
460 $res +
= $this->lengthString($value->byteSizePartial());
462 $this->checkProtoArray($this->group_by
);
463 $res +
= 1 * sizeof($this->group_by
);
464 foreach ($this->group_by
as $value) {
465 $res +
= $this->lengthString($value->byteSizePartial());
467 if (isset($this->start_cursor
)) {
469 $res +
= $this->lengthString(strlen($this->start_cursor
));
471 if (isset($this->end_cursor
)) {
473 $res +
= $this->lengthString(strlen($this->end_cursor
));
475 if (isset($this->offset
)) {
477 $res +
= $this->lengthVarInt64($this->offset
);
479 if (isset($this->limit
)) {
481 $res +
= $this->lengthVarInt64($this->limit
);
485 public function outputPartial($out) {
486 $this->checkProtoArray($this->projection
);
487 foreach ($this->projection
as $value) {
488 $out->putVarInt32(18);
489 $out->putVarInt32($value->byteSizePartial());
490 $value->outputPartial($out);
492 $this->checkProtoArray($this->kind
);
493 foreach ($this->kind
as $value) {
494 $out->putVarInt32(26);
495 $out->putVarInt32($value->byteSizePartial());
496 $value->outputPartial($out);
498 if (isset($this->filter
)) {
499 $out->putVarInt32(34);
500 $out->putVarInt32($this->filter
->byteSizePartial());
501 $this->filter
->outputPartial($out);
503 $this->checkProtoArray($this->order
);
504 foreach ($this->order
as $value) {
505 $out->putVarInt32(42);
506 $out->putVarInt32($value->byteSizePartial());
507 $value->outputPartial($out);
509 $this->checkProtoArray($this->group_by
);
510 foreach ($this->group_by
as $value) {
511 $out->putVarInt32(50);
512 $out->putVarInt32($value->byteSizePartial());
513 $value->outputPartial($out);
515 if (isset($this->start_cursor
)) {
516 $out->putVarInt32(58);
517 $out->putPrefixedString($this->start_cursor
);
519 if (isset($this->end_cursor
)) {
520 $out->putVarInt32(66);
521 $out->putPrefixedString($this->end_cursor
);
523 if (isset($this->offset
)) {
524 $out->putVarInt32(80);
525 $out->putVarInt32($this->offset
);
527 if (isset($this->limit
)) {
528 $out->putVarInt32(88);
529 $out->putVarInt32($this->limit
);
532 public function tryMerge($d) {
533 while($d->avail() > 0) {
534 $tt = $d->getVarInt32();
537 $length = $d->getVarInt32();
538 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
540 $this->addProjection()->tryMerge($tmp);
543 $length = $d->getVarInt32();
544 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
546 $this->addKind()->tryMerge($tmp);
549 $length = $d->getVarInt32();
550 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
552 $this->mutableFilter()->tryMerge($tmp);
555 $length = $d->getVarInt32();
556 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
558 $this->addOrder()->tryMerge($tmp);
561 $length = $d->getVarInt32();
562 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
564 $this->addGroupBy()->tryMerge($tmp);
567 $length = $d->getVarInt32();
568 $this->setStartCursor(substr($d->buffer(), $d->pos(), $length));
572 $length = $d->getVarInt32();
573 $this->setEndCursor(substr($d->buffer(), $d->pos(), $length));
577 $this->setOffset($d->getVarInt32());
580 $this->setLimit($d->getVarInt32());
583 throw new \google\net\
ProtocolBufferDecodeError();
590 public function checkInitialized() {
591 foreach ($this->projection
as $value) {
592 if (!$value->isInitialized()) return 'projection';
594 foreach ($this->kind
as $value) {
595 if (!$value->isInitialized()) return 'kind';
597 if (isset($this->filter
) && (!$this->filter
->isInitialized())) return 'filter';
598 foreach ($this->order
as $value) {
599 if (!$value->isInitialized()) return 'order';
601 foreach ($this->group_by
as $value) {
602 if (!$value->isInitialized()) return 'group_by';
606 public function mergeFrom($x) {
607 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
608 foreach ($x->getProjectionList() as $v) {
609 $this->addProjection()->copyFrom($v);
611 foreach ($x->getKindList() as $v) {
612 $this->addKind()->copyFrom($v);
614 if ($x->hasFilter()) {
615 $this->mutableFilter()->mergeFrom($x->getFilter());
617 foreach ($x->getOrderList() as $v) {
618 $this->addOrder()->copyFrom($v);
620 foreach ($x->getGroupByList() as $v) {
621 $this->addGroupBy()->copyFrom($v);
623 if ($x->hasStartCursor()) {
624 $this->setStartCursor($x->getStartCursor());
626 if ($x->hasEndCursor()) {
627 $this->setEndCursor($x->getEndCursor());
629 if ($x->hasOffset()) {
630 $this->setOffset($x->getOffset());
632 if ($x->hasLimit()) {
633 $this->setLimit($x->getLimit());
636 public function equals($x) {
637 if ($x === $this) { return true; }
638 if (sizeof($this->projection
) !== sizeof($x->projection
)) return false;
639 foreach (array_map(null, $this->projection
, $x->projection
) as $v) {
640 if (!$v[0]->equals($v[1])) return false;
642 if (sizeof($this->kind
) !== sizeof($x->kind
)) return false;
643 foreach (array_map(null, $this->kind
, $x->kind
) as $v) {
644 if (!$v[0]->equals($v[1])) return false;
646 if (isset($this->filter
) !== isset($x->filter
)) return false;
647 if (isset($this->filter
) && !$this->filter
->equals($x->filter
)) return false;
648 if (sizeof($this->order
) !== sizeof($x->order
)) return false;
649 foreach (array_map(null, $this->order
, $x->order
) as $v) {
650 if (!$v[0]->equals($v[1])) return false;
652 if (sizeof($this->group_by
) !== sizeof($x->group_by
)) return false;
653 foreach (array_map(null, $this->group_by
, $x->group_by
) as $v) {
654 if (!$v[0]->equals($v[1])) return false;
656 if (isset($this->start_cursor
) !== isset($x->start_cursor
)) return false;
657 if (isset($this->start_cursor
) && $this->start_cursor
!== $x->start_cursor
) return false;
658 if (isset($this->end_cursor
) !== isset($x->end_cursor
)) return false;
659 if (isset($this->end_cursor
) && $this->end_cursor
!== $x->end_cursor
) return false;
660 if (isset($this->offset
) !== isset($x->offset
)) return false;
661 if (isset($this->offset
) && !$this->integerEquals($this->offset
, $x->offset
)) return false;
662 if (isset($this->limit
) !== isset($x->limit
)) return false;
663 if (isset($this->limit
) && !$this->integerEquals($this->limit
, $x->limit
)) return false;
666 public function shortDebugString($prefix = "") {
668 foreach ($this->projection
as $value) {
669 $res .= $prefix . "projection <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
671 foreach ($this->kind
as $value) {
672 $res .= $prefix . "kind <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
674 if (isset($this->filter
)) {
675 $res .= $prefix . "filter <\n" . $this->filter
->shortDebugString($prefix . " ") . $prefix . ">\n";
677 foreach ($this->order
as $value) {
678 $res .= $prefix . "order <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
680 foreach ($this->group_by
as $value) {
681 $res .= $prefix . "group_by <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
683 if (isset($this->start_cursor
)) {
684 $res .= $prefix . "start_cursor: " . $this->debugFormatString($this->start_cursor
) . "\n";
686 if (isset($this->end_cursor
)) {
687 $res .= $prefix . "end_cursor: " . $this->debugFormatString($this->end_cursor
) . "\n";
689 if (isset($this->offset
)) {
690 $res .= $prefix . "offset: " . $this->debugFormatInt32($this->offset
) . "\n";
692 if (isset($this->limit
)) {
693 $res .= $prefix . "limit: " . $this->debugFormatInt32($this->limit
) . "\n";
699 namespace google\appengine\datastore\v
4 {
700 class KindExpression
extends \google\net\ProtocolMessage
{
701 public function getName() {
702 if (!isset($this->name
)) {
707 public function setName($val) {
711 public function clearName() {
715 public function hasName() {
716 return isset($this->name
);
718 public function clear() {
721 public function byteSizePartial() {
723 if (isset($this->name
)) {
725 $res +
= $this->lengthString(strlen($this->name
));
729 public function outputPartial($out) {
730 if (isset($this->name
)) {
731 $out->putVarInt32(10);
732 $out->putPrefixedString($this->name
);
735 public function tryMerge($d) {
736 while($d->avail() > 0) {
737 $tt = $d->getVarInt32();
740 $length = $d->getVarInt32();
741 $this->setName(substr($d->buffer(), $d->pos(), $length));
745 throw new \google\net\
ProtocolBufferDecodeError();
752 public function checkInitialized() {
753 if (!isset($this->name
)) return 'name';
756 public function mergeFrom($x) {
757 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
759 $this->setName($x->getName());
762 public function equals($x) {
763 if ($x === $this) { return true; }
764 if (isset($this->name
) !== isset($x->name
)) return false;
765 if (isset($this->name
) && $this->name
!== $x->name
) return false;
768 public function shortDebugString($prefix = "") {
770 if (isset($this->name
)) {
771 $res .= $prefix . "name: " . $this->debugFormatString($this->name
) . "\n";
777 namespace google\appengine\datastore\v
4 {
778 class PropertyReference
extends \google\net\ProtocolMessage
{
779 public function getName() {
780 if (!isset($this->name
)) {
785 public function setName($val) {
789 public function clearName() {
793 public function hasName() {
794 return isset($this->name
);
796 public function clear() {
799 public function byteSizePartial() {
801 if (isset($this->name
)) {
803 $res +
= $this->lengthString(strlen($this->name
));
807 public function outputPartial($out) {
808 if (isset($this->name
)) {
809 $out->putVarInt32(18);
810 $out->putPrefixedString($this->name
);
813 public function tryMerge($d) {
814 while($d->avail() > 0) {
815 $tt = $d->getVarInt32();
818 $length = $d->getVarInt32();
819 $this->setName(substr($d->buffer(), $d->pos(), $length));
823 throw new \google\net\
ProtocolBufferDecodeError();
830 public function checkInitialized() {
831 if (!isset($this->name
)) return 'name';
834 public function mergeFrom($x) {
835 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
837 $this->setName($x->getName());
840 public function equals($x) {
841 if ($x === $this) { return true; }
842 if (isset($this->name
) !== isset($x->name
)) return false;
843 if (isset($this->name
) && $this->name
!== $x->name
) return false;
846 public function shortDebugString($prefix = "") {
848 if (isset($this->name
)) {
849 $res .= $prefix . "name: " . $this->debugFormatString($this->name
) . "\n";
855 namespace google\appengine\datastore\v
4\PropertyExpression
{
856 class AggregationFunction
{
860 namespace google\appengine\datastore\v
4 {
861 class PropertyExpression
extends \google\net\ProtocolMessage
{
862 public function getProperty() {
863 if (!isset($this->property
)) {
864 return new \google\appengine\datastore\v
4\
PropertyReference();
866 return $this->property
;
868 public function mutableProperty() {
869 if (!isset($this->property
)) {
870 $res = new \google\appengine\datastore\v
4\
PropertyReference();
871 $this->property
= $res;
874 return $this->property
;
876 public function clearProperty() {
877 if (isset($this->property
)) {
878 unset($this->property
);
881 public function hasProperty() {
882 return isset($this->property
);
884 public function getAggregationFunction() {
885 if (!isset($this->aggregation_function
)) {
888 return $this->aggregation_function
;
890 public function setAggregationFunction($val) {
891 $this->aggregation_function
= $val;
894 public function clearAggregationFunction() {
895 unset($this->aggregation_function
);
898 public function hasAggregationFunction() {
899 return isset($this->aggregation_function
);
901 public function clear() {
902 $this->clearProperty();
903 $this->clearAggregationFunction();
905 public function byteSizePartial() {
907 if (isset($this->property
)) {
909 $res +
= $this->lengthString($this->property
->byteSizePartial());
911 if (isset($this->aggregation_function
)) {
913 $res +
= $this->lengthVarInt64($this->aggregation_function
);
917 public function outputPartial($out) {
918 if (isset($this->property
)) {
919 $out->putVarInt32(10);
920 $out->putVarInt32($this->property
->byteSizePartial());
921 $this->property
->outputPartial($out);
923 if (isset($this->aggregation_function
)) {
924 $out->putVarInt32(16);
925 $out->putVarInt32($this->aggregation_function
);
928 public function tryMerge($d) {
929 while($d->avail() > 0) {
930 $tt = $d->getVarInt32();
933 $length = $d->getVarInt32();
934 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
936 $this->mutableProperty()->tryMerge($tmp);
939 $this->setAggregationFunction($d->getVarInt32());
942 throw new \google\net\
ProtocolBufferDecodeError();
949 public function checkInitialized() {
950 if ((!isset($this->property
)) ||
(!$this->property
->isInitialized())) return 'property';
953 public function mergeFrom($x) {
954 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
955 if ($x->hasProperty()) {
956 $this->mutableProperty()->mergeFrom($x->getProperty());
958 if ($x->hasAggregationFunction()) {
959 $this->setAggregationFunction($x->getAggregationFunction());
962 public function equals($x) {
963 if ($x === $this) { return true; }
964 if (isset($this->property
) !== isset($x->property
)) return false;
965 if (isset($this->property
) && !$this->property
->equals($x->property
)) return false;
966 if (isset($this->aggregation_function
) !== isset($x->aggregation_function
)) return false;
967 if (isset($this->aggregation_function
) && $this->aggregation_function
!== $x->aggregation_function
) return false;
970 public function shortDebugString($prefix = "") {
972 if (isset($this->property
)) {
973 $res .= $prefix . "property <\n" . $this->property
->shortDebugString($prefix . " ") . $prefix . ">\n";
975 if (isset($this->aggregation_function
)) {
976 $res .= $prefix . "aggregation_function: " . ($this->aggregation_function
) . "\n";
982 namespace google\appengine\datastore\v
4\PropertyOrder
{
985 const DESCENDING
= 2;
988 namespace google\appengine\datastore\v
4 {
989 class PropertyOrder
extends \google\net\ProtocolMessage
{
990 public function getProperty() {
991 if (!isset($this->property
)) {
992 return new \google\appengine\datastore\v
4\
PropertyReference();
994 return $this->property
;
996 public function mutableProperty() {
997 if (!isset($this->property
)) {
998 $res = new \google\appengine\datastore\v
4\
PropertyReference();
999 $this->property
= $res;
1002 return $this->property
;
1004 public function clearProperty() {
1005 if (isset($this->property
)) {
1006 unset($this->property
);
1009 public function hasProperty() {
1010 return isset($this->property
);
1012 public function getDirection() {
1013 if (!isset($this->direction
)) {
1016 return $this->direction
;
1018 public function setDirection($val) {
1019 $this->direction
= $val;
1022 public function clearDirection() {
1023 unset($this->direction
);
1026 public function hasDirection() {
1027 return isset($this->direction
);
1029 public function clear() {
1030 $this->clearProperty();
1031 $this->clearDirection();
1033 public function byteSizePartial() {
1035 if (isset($this->property
)) {
1037 $res +
= $this->lengthString($this->property
->byteSizePartial());
1039 if (isset($this->direction
)) {
1041 $res +
= $this->lengthVarInt64($this->direction
);
1045 public function outputPartial($out) {
1046 if (isset($this->property
)) {
1047 $out->putVarInt32(10);
1048 $out->putVarInt32($this->property
->byteSizePartial());
1049 $this->property
->outputPartial($out);
1051 if (isset($this->direction
)) {
1052 $out->putVarInt32(16);
1053 $out->putVarInt32($this->direction
);
1056 public function tryMerge($d) {
1057 while($d->avail() > 0) {
1058 $tt = $d->getVarInt32();
1061 $length = $d->getVarInt32();
1062 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1064 $this->mutableProperty()->tryMerge($tmp);
1067 $this->setDirection($d->getVarInt32());
1070 throw new \google\net\
ProtocolBufferDecodeError();
1077 public function checkInitialized() {
1078 if ((!isset($this->property
)) ||
(!$this->property
->isInitialized())) return 'property';
1081 public function mergeFrom($x) {
1082 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1083 if ($x->hasProperty()) {
1084 $this->mutableProperty()->mergeFrom($x->getProperty());
1086 if ($x->hasDirection()) {
1087 $this->setDirection($x->getDirection());
1090 public function equals($x) {
1091 if ($x === $this) { return true; }
1092 if (isset($this->property
) !== isset($x->property
)) return false;
1093 if (isset($this->property
) && !$this->property
->equals($x->property
)) return false;
1094 if (isset($this->direction
) !== isset($x->direction
)) return false;
1095 if (isset($this->direction
) && $this->direction
!== $x->direction
) return false;
1098 public function shortDebugString($prefix = "") {
1100 if (isset($this->property
)) {
1101 $res .= $prefix . "property <\n" . $this->property
->shortDebugString($prefix . " ") . $prefix . ">\n";
1103 if (isset($this->direction
)) {
1104 $res .= $prefix . "direction: " . ($this->direction
) . "\n";
1110 namespace google\appengine\datastore\v
4 {
1111 class Filter
extends \google\net\ProtocolMessage
{
1112 public function getCompositeFilter() {
1113 if (!isset($this->composite_filter
)) {
1114 return new \google\appengine\datastore\v
4\
CompositeFilter();
1116 return $this->composite_filter
;
1118 public function mutableCompositeFilter() {
1119 if (!isset($this->composite_filter
)) {
1120 $res = new \google\appengine\datastore\v
4\
CompositeFilter();
1121 $this->composite_filter
= $res;
1124 return $this->composite_filter
;
1126 public function clearCompositeFilter() {
1127 if (isset($this->composite_filter
)) {
1128 unset($this->composite_filter
);
1131 public function hasCompositeFilter() {
1132 return isset($this->composite_filter
);
1134 public function getPropertyFilter() {
1135 if (!isset($this->property_filter
)) {
1136 return new \google\appengine\datastore\v
4\
PropertyFilter();
1138 return $this->property_filter
;
1140 public function mutablePropertyFilter() {
1141 if (!isset($this->property_filter
)) {
1142 $res = new \google\appengine\datastore\v
4\
PropertyFilter();
1143 $this->property_filter
= $res;
1146 return $this->property_filter
;
1148 public function clearPropertyFilter() {
1149 if (isset($this->property_filter
)) {
1150 unset($this->property_filter
);
1153 public function hasPropertyFilter() {
1154 return isset($this->property_filter
);
1156 public function getBoundingCircleFilter() {
1157 if (!isset($this->bounding_circle_filter
)) {
1158 return new \google\appengine\datastore\v
4\
BoundingCircleFilter();
1160 return $this->bounding_circle_filter
;
1162 public function mutableBoundingCircleFilter() {
1163 if (!isset($this->bounding_circle_filter
)) {
1164 $res = new \google\appengine\datastore\v
4\
BoundingCircleFilter();
1165 $this->bounding_circle_filter
= $res;
1168 return $this->bounding_circle_filter
;
1170 public function clearBoundingCircleFilter() {
1171 if (isset($this->bounding_circle_filter
)) {
1172 unset($this->bounding_circle_filter
);
1175 public function hasBoundingCircleFilter() {
1176 return isset($this->bounding_circle_filter
);
1178 public function getBoundingBoxFilter() {
1179 if (!isset($this->bounding_box_filter
)) {
1180 return new \google\appengine\datastore\v
4\
BoundingBoxFilter();
1182 return $this->bounding_box_filter
;
1184 public function mutableBoundingBoxFilter() {
1185 if (!isset($this->bounding_box_filter
)) {
1186 $res = new \google\appengine\datastore\v
4\
BoundingBoxFilter();
1187 $this->bounding_box_filter
= $res;
1190 return $this->bounding_box_filter
;
1192 public function clearBoundingBoxFilter() {
1193 if (isset($this->bounding_box_filter
)) {
1194 unset($this->bounding_box_filter
);
1197 public function hasBoundingBoxFilter() {
1198 return isset($this->bounding_box_filter
);
1200 public function clear() {
1201 $this->clearCompositeFilter();
1202 $this->clearPropertyFilter();
1203 $this->clearBoundingCircleFilter();
1204 $this->clearBoundingBoxFilter();
1206 public function byteSizePartial() {
1208 if (isset($this->composite_filter
)) {
1210 $res +
= $this->lengthString($this->composite_filter
->byteSizePartial());
1212 if (isset($this->property_filter
)) {
1214 $res +
= $this->lengthString($this->property_filter
->byteSizePartial());
1216 if (isset($this->bounding_circle_filter
)) {
1218 $res +
= $this->lengthString($this->bounding_circle_filter
->byteSizePartial());
1220 if (isset($this->bounding_box_filter
)) {
1222 $res +
= $this->lengthString($this->bounding_box_filter
->byteSizePartial());
1226 public function outputPartial($out) {
1227 if (isset($this->composite_filter
)) {
1228 $out->putVarInt32(10);
1229 $out->putVarInt32($this->composite_filter
->byteSizePartial());
1230 $this->composite_filter
->outputPartial($out);
1232 if (isset($this->property_filter
)) {
1233 $out->putVarInt32(18);
1234 $out->putVarInt32($this->property_filter
->byteSizePartial());
1235 $this->property_filter
->outputPartial($out);
1237 if (isset($this->bounding_circle_filter
)) {
1238 $out->putVarInt32(26);
1239 $out->putVarInt32($this->bounding_circle_filter
->byteSizePartial());
1240 $this->bounding_circle_filter
->outputPartial($out);
1242 if (isset($this->bounding_box_filter
)) {
1243 $out->putVarInt32(34);
1244 $out->putVarInt32($this->bounding_box_filter
->byteSizePartial());
1245 $this->bounding_box_filter
->outputPartial($out);
1248 public function tryMerge($d) {
1249 while($d->avail() > 0) {
1250 $tt = $d->getVarInt32();
1253 $length = $d->getVarInt32();
1254 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1256 $this->mutableCompositeFilter()->tryMerge($tmp);
1259 $length = $d->getVarInt32();
1260 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1262 $this->mutablePropertyFilter()->tryMerge($tmp);
1265 $length = $d->getVarInt32();
1266 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1268 $this->mutableBoundingCircleFilter()->tryMerge($tmp);
1271 $length = $d->getVarInt32();
1272 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1274 $this->mutableBoundingBoxFilter()->tryMerge($tmp);
1277 throw new \google\net\
ProtocolBufferDecodeError();
1284 public function checkInitialized() {
1285 if (isset($this->composite_filter
) && (!$this->composite_filter
->isInitialized())) return 'composite_filter';
1286 if (isset($this->property_filter
) && (!$this->property_filter
->isInitialized())) return 'property_filter';
1287 if (isset($this->bounding_circle_filter
) && (!$this->bounding_circle_filter
->isInitialized())) return 'bounding_circle_filter';
1288 if (isset($this->bounding_box_filter
) && (!$this->bounding_box_filter
->isInitialized())) return 'bounding_box_filter';
1291 public function mergeFrom($x) {
1292 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1293 if ($x->hasCompositeFilter()) {
1294 $this->mutableCompositeFilter()->mergeFrom($x->getCompositeFilter());
1296 if ($x->hasPropertyFilter()) {
1297 $this->mutablePropertyFilter()->mergeFrom($x->getPropertyFilter());
1299 if ($x->hasBoundingCircleFilter()) {
1300 $this->mutableBoundingCircleFilter()->mergeFrom($x->getBoundingCircleFilter());
1302 if ($x->hasBoundingBoxFilter()) {
1303 $this->mutableBoundingBoxFilter()->mergeFrom($x->getBoundingBoxFilter());
1306 public function equals($x) {
1307 if ($x === $this) { return true; }
1308 if (isset($this->composite_filter
) !== isset($x->composite_filter
)) return false;
1309 if (isset($this->composite_filter
) && !$this->composite_filter
->equals($x->composite_filter
)) return false;
1310 if (isset($this->property_filter
) !== isset($x->property_filter
)) return false;
1311 if (isset($this->property_filter
) && !$this->property_filter
->equals($x->property_filter
)) return false;
1312 if (isset($this->bounding_circle_filter
) !== isset($x->bounding_circle_filter
)) return false;
1313 if (isset($this->bounding_circle_filter
) && !$this->bounding_circle_filter
->equals($x->bounding_circle_filter
)) return false;
1314 if (isset($this->bounding_box_filter
) !== isset($x->bounding_box_filter
)) return false;
1315 if (isset($this->bounding_box_filter
) && !$this->bounding_box_filter
->equals($x->bounding_box_filter
)) return false;
1318 public function shortDebugString($prefix = "") {
1320 if (isset($this->composite_filter
)) {
1321 $res .= $prefix . "composite_filter <\n" . $this->composite_filter
->shortDebugString($prefix . " ") . $prefix . ">\n";
1323 if (isset($this->property_filter
)) {
1324 $res .= $prefix . "property_filter <\n" . $this->property_filter
->shortDebugString($prefix . " ") . $prefix . ">\n";
1326 if (isset($this->bounding_circle_filter
)) {
1327 $res .= $prefix . "bounding_circle_filter <\n" . $this->bounding_circle_filter
->shortDebugString($prefix . " ") . $prefix . ">\n";
1329 if (isset($this->bounding_box_filter
)) {
1330 $res .= $prefix . "bounding_box_filter <\n" . $this->bounding_box_filter
->shortDebugString($prefix . " ") . $prefix . ">\n";
1336 namespace google\appengine\datastore\v
4\CompositeFilter
{
1341 namespace google\appengine\datastore\v
4 {
1342 class CompositeFilter
extends \google\net\ProtocolMessage
{
1343 private $filter = array();
1344 public function getOperator() {
1345 if (!isset($this->operator
)) {
1348 return $this->operator
;
1350 public function setOperator($val) {
1351 $this->operator
= $val;
1354 public function clearOperator() {
1355 unset($this->operator
);
1358 public function hasOperator() {
1359 return isset($this->operator
);
1361 public function getFilterSize() {
1362 return sizeof($this->filter
);
1364 public function getFilterList() {
1365 return $this->filter
;
1367 public function mutableFilter($idx) {
1368 if (!isset($this->filter
[$idx])) {
1369 $val = new \google\appengine\datastore\v
4\
Filter();
1370 $this->filter
[$idx] = $val;
1373 return $this->filter
[$idx];
1375 public function getFilter($idx) {
1376 if (isset($this->filter
[$idx])) {
1377 return $this->filter
[$idx];
1379 if ($idx >= end(array_keys($this->filter
))) {
1380 throw new \
OutOfRangeException('index out of range: ' +
$idx);
1382 return new \google\appengine\datastore\v
4\
Filter();
1384 public function addFilter() {
1385 $val = new \google\appengine\datastore\v
4\
Filter();
1386 $this->filter
[] = $val;
1389 public function clearFilter() {
1390 $this->filter
= array();
1392 public function clear() {
1393 $this->clearOperator();
1394 $this->clearFilter();
1396 public function byteSizePartial() {
1398 if (isset($this->operator
)) {
1400 $res +
= $this->lengthVarInt64($this->operator
);
1402 $this->checkProtoArray($this->filter
);
1403 $res +
= 1 * sizeof($this->filter
);
1404 foreach ($this->filter
as $value) {
1405 $res +
= $this->lengthString($value->byteSizePartial());
1409 public function outputPartial($out) {
1410 if (isset($this->operator
)) {
1411 $out->putVarInt32(8);
1412 $out->putVarInt32($this->operator
);
1414 $this->checkProtoArray($this->filter
);
1415 foreach ($this->filter
as $value) {
1416 $out->putVarInt32(18);
1417 $out->putVarInt32($value->byteSizePartial());
1418 $value->outputPartial($out);
1421 public function tryMerge($d) {
1422 while($d->avail() > 0) {
1423 $tt = $d->getVarInt32();
1426 $this->setOperator($d->getVarInt32());
1429 $length = $d->getVarInt32();
1430 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1432 $this->addFilter()->tryMerge($tmp);
1435 throw new \google\net\
ProtocolBufferDecodeError();
1442 public function checkInitialized() {
1443 if (!isset($this->operator
)) return 'operator';
1444 foreach ($this->filter
as $value) {
1445 if (!$value->isInitialized()) return 'filter';
1449 public function mergeFrom($x) {
1450 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1451 if ($x->hasOperator()) {
1452 $this->setOperator($x->getOperator());
1454 foreach ($x->getFilterList() as $v) {
1455 $this->addFilter()->copyFrom($v);
1458 public function equals($x) {
1459 if ($x === $this) { return true; }
1460 if (isset($this->operator
) !== isset($x->operator
)) return false;
1461 if (isset($this->operator
) && $this->operator
!== $x->operator
) return false;
1462 if (sizeof($this->filter
) !== sizeof($x->filter
)) return false;
1463 foreach (array_map(null, $this->filter
, $x->filter
) as $v) {
1464 if (!$v[0]->equals($v[1])) return false;
1468 public function shortDebugString($prefix = "") {
1470 if (isset($this->operator
)) {
1471 $res .= $prefix . "operator: " . ($this->operator
) . "\n";
1473 foreach ($this->filter
as $value) {
1474 $res .= $prefix . "filter <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
1480 namespace google\appengine\datastore\v
4\PropertyFilter
{
1482 const LESS_THAN
= 1;
1483 const LESS_THAN_OR_EQUAL
= 2;
1484 const GREATER_THAN
= 3;
1485 const GREATER_THAN_OR_EQUAL
= 4;
1487 const HAS_ANCESTOR
= 11;
1490 namespace google\appengine\datastore\v
4 {
1491 class PropertyFilter
extends \google\net\ProtocolMessage
{
1492 public function getProperty() {
1493 if (!isset($this->property
)) {
1494 return new \google\appengine\datastore\v
4\
PropertyReference();
1496 return $this->property
;
1498 public function mutableProperty() {
1499 if (!isset($this->property
)) {
1500 $res = new \google\appengine\datastore\v
4\
PropertyReference();
1501 $this->property
= $res;
1504 return $this->property
;
1506 public function clearProperty() {
1507 if (isset($this->property
)) {
1508 unset($this->property
);
1511 public function hasProperty() {
1512 return isset($this->property
);
1514 public function getOperator() {
1515 if (!isset($this->operator
)) {
1518 return $this->operator
;
1520 public function setOperator($val) {
1521 $this->operator
= $val;
1524 public function clearOperator() {
1525 unset($this->operator
);
1528 public function hasOperator() {
1529 return isset($this->operator
);
1531 public function getValue() {
1532 if (!isset($this->value
)) {
1533 return new \google\appengine\datastore\v
4\
Value();
1535 return $this->value
;
1537 public function mutableValue() {
1538 if (!isset($this->value
)) {
1539 $res = new \google\appengine\datastore\v
4\
Value();
1540 $this->value
= $res;
1543 return $this->value
;
1545 public function clearValue() {
1546 if (isset($this->value
)) {
1547 unset($this->value
);
1550 public function hasValue() {
1551 return isset($this->value
);
1553 public function clear() {
1554 $this->clearProperty();
1555 $this->clearOperator();
1556 $this->clearValue();
1558 public function byteSizePartial() {
1560 if (isset($this->property
)) {
1562 $res +
= $this->lengthString($this->property
->byteSizePartial());
1564 if (isset($this->operator
)) {
1566 $res +
= $this->lengthVarInt64($this->operator
);
1568 if (isset($this->value
)) {
1570 $res +
= $this->lengthString($this->value
->byteSizePartial());
1574 public function outputPartial($out) {
1575 if (isset($this->property
)) {
1576 $out->putVarInt32(10);
1577 $out->putVarInt32($this->property
->byteSizePartial());
1578 $this->property
->outputPartial($out);
1580 if (isset($this->operator
)) {
1581 $out->putVarInt32(16);
1582 $out->putVarInt32($this->operator
);
1584 if (isset($this->value
)) {
1585 $out->putVarInt32(26);
1586 $out->putVarInt32($this->value
->byteSizePartial());
1587 $this->value
->outputPartial($out);
1590 public function tryMerge($d) {
1591 while($d->avail() > 0) {
1592 $tt = $d->getVarInt32();
1595 $length = $d->getVarInt32();
1596 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1598 $this->mutableProperty()->tryMerge($tmp);
1601 $this->setOperator($d->getVarInt32());
1604 $length = $d->getVarInt32();
1605 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1607 $this->mutableValue()->tryMerge($tmp);
1610 throw new \google\net\
ProtocolBufferDecodeError();
1617 public function checkInitialized() {
1618 if ((!isset($this->property
)) ||
(!$this->property
->isInitialized())) return 'property';
1619 if (!isset($this->operator
)) return 'operator';
1620 if ((!isset($this->value
)) ||
(!$this->value
->isInitialized())) return 'value';
1623 public function mergeFrom($x) {
1624 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1625 if ($x->hasProperty()) {
1626 $this->mutableProperty()->mergeFrom($x->getProperty());
1628 if ($x->hasOperator()) {
1629 $this->setOperator($x->getOperator());
1631 if ($x->hasValue()) {
1632 $this->mutableValue()->mergeFrom($x->getValue());
1635 public function equals($x) {
1636 if ($x === $this) { return true; }
1637 if (isset($this->property
) !== isset($x->property
)) return false;
1638 if (isset($this->property
) && !$this->property
->equals($x->property
)) return false;
1639 if (isset($this->operator
) !== isset($x->operator
)) return false;
1640 if (isset($this->operator
) && $this->operator
!== $x->operator
) return false;
1641 if (isset($this->value
) !== isset($x->value
)) return false;
1642 if (isset($this->value
) && !$this->value
->equals($x->value
)) return false;
1645 public function shortDebugString($prefix = "") {
1647 if (isset($this->property
)) {
1648 $res .= $prefix . "property <\n" . $this->property
->shortDebugString($prefix . " ") . $prefix . ">\n";
1650 if (isset($this->operator
)) {
1651 $res .= $prefix . "operator: " . ($this->operator
) . "\n";
1653 if (isset($this->value
)) {
1654 $res .= $prefix . "value <\n" . $this->value
->shortDebugString($prefix . " ") . $prefix . ">\n";
1660 namespace google\appengine\datastore\v
4 {
1661 class BoundingCircleFilter
extends \google\net\ProtocolMessage
{
1662 public function getProperty() {
1663 if (!isset($this->property
)) {
1664 return new \google\appengine\datastore\v
4\
PropertyReference();
1666 return $this->property
;
1668 public function mutableProperty() {
1669 if (!isset($this->property
)) {
1670 $res = new \google\appengine\datastore\v
4\
PropertyReference();
1671 $this->property
= $res;
1674 return $this->property
;
1676 public function clearProperty() {
1677 if (isset($this->property
)) {
1678 unset($this->property
);
1681 public function hasProperty() {
1682 return isset($this->property
);
1684 public function getCenter() {
1685 if (!isset($this->center
)) {
1686 return new \google\appengine\datastore\v
4\
GeoPoint();
1688 return $this->center
;
1690 public function mutableCenter() {
1691 if (!isset($this->center
)) {
1692 $res = new \google\appengine\datastore\v
4\
GeoPoint();
1693 $this->center
= $res;
1696 return $this->center
;
1698 public function clearCenter() {
1699 if (isset($this->center
)) {
1700 unset($this->center
);
1703 public function hasCenter() {
1704 return isset($this->center
);
1706 public function getRadiusMeters() {
1707 if (!isset($this->radius_meters
)) {
1710 return $this->radius_meters
;
1712 public function setRadiusMeters($val) {
1713 $this->radius_meters
= $val;
1716 public function clearRadiusMeters() {
1717 unset($this->radius_meters
);
1720 public function hasRadiusMeters() {
1721 return isset($this->radius_meters
);
1723 public function clear() {
1724 $this->clearProperty();
1725 $this->clearCenter();
1726 $this->clearRadiusMeters();
1728 public function byteSizePartial() {
1730 if (isset($this->property
)) {
1732 $res +
= $this->lengthString($this->property
->byteSizePartial());
1734 if (isset($this->center
)) {
1736 $res +
= $this->lengthString($this->center
->byteSizePartial());
1738 if (isset($this->radius_meters
)) {
1743 public function outputPartial($out) {
1744 if (isset($this->property
)) {
1745 $out->putVarInt32(10);
1746 $out->putVarInt32($this->property
->byteSizePartial());
1747 $this->property
->outputPartial($out);
1749 if (isset($this->center
)) {
1750 $out->putVarInt32(18);
1751 $out->putVarInt32($this->center
->byteSizePartial());
1752 $this->center
->outputPartial($out);
1754 if (isset($this->radius_meters
)) {
1755 $out->putVarInt32(25);
1756 $out->putDouble($this->radius_meters
);
1759 public function tryMerge($d) {
1760 while($d->avail() > 0) {
1761 $tt = $d->getVarInt32();
1764 $length = $d->getVarInt32();
1765 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1767 $this->mutableProperty()->tryMerge($tmp);
1770 $length = $d->getVarInt32();
1771 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1773 $this->mutableCenter()->tryMerge($tmp);
1776 $this->setRadiusMeters($d->getDouble());
1779 throw new \google\net\
ProtocolBufferDecodeError();
1786 public function checkInitialized() {
1787 if ((!isset($this->property
)) ||
(!$this->property
->isInitialized())) return 'property';
1788 if ((!isset($this->center
)) ||
(!$this->center
->isInitialized())) return 'center';
1789 if (!isset($this->radius_meters
)) return 'radius_meters';
1792 public function mergeFrom($x) {
1793 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1794 if ($x->hasProperty()) {
1795 $this->mutableProperty()->mergeFrom($x->getProperty());
1797 if ($x->hasCenter()) {
1798 $this->mutableCenter()->mergeFrom($x->getCenter());
1800 if ($x->hasRadiusMeters()) {
1801 $this->setRadiusMeters($x->getRadiusMeters());
1804 public function equals($x) {
1805 if ($x === $this) { return true; }
1806 if (isset($this->property
) !== isset($x->property
)) return false;
1807 if (isset($this->property
) && !$this->property
->equals($x->property
)) return false;
1808 if (isset($this->center
) !== isset($x->center
)) return false;
1809 if (isset($this->center
) && !$this->center
->equals($x->center
)) return false;
1810 if (isset($this->radius_meters
) !== isset($x->radius_meters
)) return false;
1811 if (isset($this->radius_meters
) && $this->radius_meters
!== $x->radius_meters
) return false;
1814 public function shortDebugString($prefix = "") {
1816 if (isset($this->property
)) {
1817 $res .= $prefix . "property <\n" . $this->property
->shortDebugString($prefix . " ") . $prefix . ">\n";
1819 if (isset($this->center
)) {
1820 $res .= $prefix . "center <\n" . $this->center
->shortDebugString($prefix . " ") . $prefix . ">\n";
1822 if (isset($this->radius_meters
)) {
1823 $res .= $prefix . "radius_meters: " . $this->debugFormatDouble($this->radius_meters
) . "\n";
1829 namespace google\appengine\datastore\v
4 {
1830 class BoundingBoxFilter
extends \google\net\ProtocolMessage
{
1831 public function getProperty() {
1832 if (!isset($this->property
)) {
1833 return new \google\appengine\datastore\v
4\
PropertyReference();
1835 return $this->property
;
1837 public function mutableProperty() {
1838 if (!isset($this->property
)) {
1839 $res = new \google\appengine\datastore\v
4\
PropertyReference();
1840 $this->property
= $res;
1843 return $this->property
;
1845 public function clearProperty() {
1846 if (isset($this->property
)) {
1847 unset($this->property
);
1850 public function hasProperty() {
1851 return isset($this->property
);
1853 public function getSouthwest() {
1854 if (!isset($this->southwest
)) {
1855 return new \google\appengine\datastore\v
4\
GeoPoint();
1857 return $this->southwest
;
1859 public function mutableSouthwest() {
1860 if (!isset($this->southwest
)) {
1861 $res = new \google\appengine\datastore\v
4\
GeoPoint();
1862 $this->southwest
= $res;
1865 return $this->southwest
;
1867 public function clearSouthwest() {
1868 if (isset($this->southwest
)) {
1869 unset($this->southwest
);
1872 public function hasSouthwest() {
1873 return isset($this->southwest
);
1875 public function getNortheast() {
1876 if (!isset($this->northeast
)) {
1877 return new \google\appengine\datastore\v
4\
GeoPoint();
1879 return $this->northeast
;
1881 public function mutableNortheast() {
1882 if (!isset($this->northeast
)) {
1883 $res = new \google\appengine\datastore\v
4\
GeoPoint();
1884 $this->northeast
= $res;
1887 return $this->northeast
;
1889 public function clearNortheast() {
1890 if (isset($this->northeast
)) {
1891 unset($this->northeast
);
1894 public function hasNortheast() {
1895 return isset($this->northeast
);
1897 public function clear() {
1898 $this->clearProperty();
1899 $this->clearSouthwest();
1900 $this->clearNortheast();
1902 public function byteSizePartial() {
1904 if (isset($this->property
)) {
1906 $res +
= $this->lengthString($this->property
->byteSizePartial());
1908 if (isset($this->southwest
)) {
1910 $res +
= $this->lengthString($this->southwest
->byteSizePartial());
1912 if (isset($this->northeast
)) {
1914 $res +
= $this->lengthString($this->northeast
->byteSizePartial());
1918 public function outputPartial($out) {
1919 if (isset($this->property
)) {
1920 $out->putVarInt32(10);
1921 $out->putVarInt32($this->property
->byteSizePartial());
1922 $this->property
->outputPartial($out);
1924 if (isset($this->southwest
)) {
1925 $out->putVarInt32(18);
1926 $out->putVarInt32($this->southwest
->byteSizePartial());
1927 $this->southwest
->outputPartial($out);
1929 if (isset($this->northeast
)) {
1930 $out->putVarInt32(26);
1931 $out->putVarInt32($this->northeast
->byteSizePartial());
1932 $this->northeast
->outputPartial($out);
1935 public function tryMerge($d) {
1936 while($d->avail() > 0) {
1937 $tt = $d->getVarInt32();
1940 $length = $d->getVarInt32();
1941 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1943 $this->mutableProperty()->tryMerge($tmp);
1946 $length = $d->getVarInt32();
1947 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1949 $this->mutableSouthwest()->tryMerge($tmp);
1952 $length = $d->getVarInt32();
1953 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
1955 $this->mutableNortheast()->tryMerge($tmp);
1958 throw new \google\net\
ProtocolBufferDecodeError();
1965 public function checkInitialized() {
1966 if ((!isset($this->property
)) ||
(!$this->property
->isInitialized())) return 'property';
1967 if ((!isset($this->southwest
)) ||
(!$this->southwest
->isInitialized())) return 'southwest';
1968 if ((!isset($this->northeast
)) ||
(!$this->northeast
->isInitialized())) return 'northeast';
1971 public function mergeFrom($x) {
1972 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
1973 if ($x->hasProperty()) {
1974 $this->mutableProperty()->mergeFrom($x->getProperty());
1976 if ($x->hasSouthwest()) {
1977 $this->mutableSouthwest()->mergeFrom($x->getSouthwest());
1979 if ($x->hasNortheast()) {
1980 $this->mutableNortheast()->mergeFrom($x->getNortheast());
1983 public function equals($x) {
1984 if ($x === $this) { return true; }
1985 if (isset($this->property
) !== isset($x->property
)) return false;
1986 if (isset($this->property
) && !$this->property
->equals($x->property
)) return false;
1987 if (isset($this->southwest
) !== isset($x->southwest
)) return false;
1988 if (isset($this->southwest
) && !$this->southwest
->equals($x->southwest
)) return false;
1989 if (isset($this->northeast
) !== isset($x->northeast
)) return false;
1990 if (isset($this->northeast
) && !$this->northeast
->equals($x->northeast
)) return false;
1993 public function shortDebugString($prefix = "") {
1995 if (isset($this->property
)) {
1996 $res .= $prefix . "property <\n" . $this->property
->shortDebugString($prefix . " ") . $prefix . ">\n";
1998 if (isset($this->southwest
)) {
1999 $res .= $prefix . "southwest <\n" . $this->southwest
->shortDebugString($prefix . " ") . $prefix . ">\n";
2001 if (isset($this->northeast
)) {
2002 $res .= $prefix . "northeast <\n" . $this->northeast
->shortDebugString($prefix . " ") . $prefix . ">\n";
2008 namespace google\appengine\datastore\v
4 {
2009 class GqlQuery
extends \google\net\ProtocolMessage
{
2010 private $name_arg = array();
2011 private $number_arg = array();
2012 public function getQueryString() {
2013 if (!isset($this->query_string
)) {
2016 return $this->query_string
;
2018 public function setQueryString($val) {
2019 $this->query_string
= $val;
2022 public function clearQueryString() {
2023 unset($this->query_string
);
2026 public function hasQueryString() {
2027 return isset($this->query_string
);
2029 public function getAllowLiteral() {
2030 if (!isset($this->allow_literal
)) {
2033 return $this->allow_literal
;
2035 public function setAllowLiteral($val) {
2036 $this->allow_literal
= $val;
2039 public function clearAllowLiteral() {
2040 unset($this->allow_literal
);
2043 public function hasAllowLiteral() {
2044 return isset($this->allow_literal
);
2046 public function getNameArgSize() {
2047 return sizeof($this->name_arg
);
2049 public function getNameArgList() {
2050 return $this->name_arg
;
2052 public function mutableNameArg($idx) {
2053 if (!isset($this->name_arg
[$idx])) {
2054 $val = new \google\appengine\datastore\v
4\
GqlQueryArg();
2055 $this->name_arg
[$idx] = $val;
2058 return $this->name_arg
[$idx];
2060 public function getNameArg($idx) {
2061 if (isset($this->name_arg
[$idx])) {
2062 return $this->name_arg
[$idx];
2064 if ($idx >= end(array_keys($this->name_arg
))) {
2065 throw new \
OutOfRangeException('index out of range: ' +
$idx);
2067 return new \google\appengine\datastore\v
4\
GqlQueryArg();
2069 public function addNameArg() {
2070 $val = new \google\appengine\datastore\v
4\
GqlQueryArg();
2071 $this->name_arg
[] = $val;
2074 public function clearNameArg() {
2075 $this->name_arg
= array();
2077 public function getNumberArgSize() {
2078 return sizeof($this->number_arg
);
2080 public function getNumberArgList() {
2081 return $this->number_arg
;
2083 public function mutableNumberArg($idx) {
2084 if (!isset($this->number_arg
[$idx])) {
2085 $val = new \google\appengine\datastore\v
4\
GqlQueryArg();
2086 $this->number_arg
[$idx] = $val;
2089 return $this->number_arg
[$idx];
2091 public function getNumberArg($idx) {
2092 if (isset($this->number_arg
[$idx])) {
2093 return $this->number_arg
[$idx];
2095 if ($idx >= end(array_keys($this->number_arg
))) {
2096 throw new \
OutOfRangeException('index out of range: ' +
$idx);
2098 return new \google\appengine\datastore\v
4\
GqlQueryArg();
2100 public function addNumberArg() {
2101 $val = new \google\appengine\datastore\v
4\
GqlQueryArg();
2102 $this->number_arg
[] = $val;
2105 public function clearNumberArg() {
2106 $this->number_arg
= array();
2108 public function clear() {
2109 $this->clearQueryString();
2110 $this->clearAllowLiteral();
2111 $this->clearNameArg();
2112 $this->clearNumberArg();
2114 public function byteSizePartial() {
2116 if (isset($this->query_string
)) {
2118 $res +
= $this->lengthString(strlen($this->query_string
));
2120 if (isset($this->allow_literal
)) {
2123 $this->checkProtoArray($this->name_arg
);
2124 $res +
= 1 * sizeof($this->name_arg
);
2125 foreach ($this->name_arg
as $value) {
2126 $res +
= $this->lengthString($value->byteSizePartial());
2128 $this->checkProtoArray($this->number_arg
);
2129 $res +
= 1 * sizeof($this->number_arg
);
2130 foreach ($this->number_arg
as $value) {
2131 $res +
= $this->lengthString($value->byteSizePartial());
2135 public function outputPartial($out) {
2136 if (isset($this->query_string
)) {
2137 $out->putVarInt32(10);
2138 $out->putPrefixedString($this->query_string
);
2140 if (isset($this->allow_literal
)) {
2141 $out->putVarInt32(16);
2142 $out->putBoolean($this->allow_literal
);
2144 $this->checkProtoArray($this->name_arg
);
2145 foreach ($this->name_arg
as $value) {
2146 $out->putVarInt32(26);
2147 $out->putVarInt32($value->byteSizePartial());
2148 $value->outputPartial($out);
2150 $this->checkProtoArray($this->number_arg
);
2151 foreach ($this->number_arg
as $value) {
2152 $out->putVarInt32(34);
2153 $out->putVarInt32($value->byteSizePartial());
2154 $value->outputPartial($out);
2157 public function tryMerge($d) {
2158 while($d->avail() > 0) {
2159 $tt = $d->getVarInt32();
2162 $length = $d->getVarInt32();
2163 $this->setQueryString(substr($d->buffer(), $d->pos(), $length));
2167 $this->setAllowLiteral($d->getBoolean());
2170 $length = $d->getVarInt32();
2171 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2173 $this->addNameArg()->tryMerge($tmp);
2176 $length = $d->getVarInt32();
2177 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2179 $this->addNumberArg()->tryMerge($tmp);
2182 throw new \google\net\
ProtocolBufferDecodeError();
2189 public function checkInitialized() {
2190 if (!isset($this->query_string
)) return 'query_string';
2191 foreach ($this->name_arg
as $value) {
2192 if (!$value->isInitialized()) return 'name_arg';
2194 foreach ($this->number_arg
as $value) {
2195 if (!$value->isInitialized()) return 'number_arg';
2199 public function mergeFrom($x) {
2200 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
2201 if ($x->hasQueryString()) {
2202 $this->setQueryString($x->getQueryString());
2204 if ($x->hasAllowLiteral()) {
2205 $this->setAllowLiteral($x->getAllowLiteral());
2207 foreach ($x->getNameArgList() as $v) {
2208 $this->addNameArg()->copyFrom($v);
2210 foreach ($x->getNumberArgList() as $v) {
2211 $this->addNumberArg()->copyFrom($v);
2214 public function equals($x) {
2215 if ($x === $this) { return true; }
2216 if (isset($this->query_string
) !== isset($x->query_string
)) return false;
2217 if (isset($this->query_string
) && $this->query_string
!== $x->query_string
) return false;
2218 if (isset($this->allow_literal
) !== isset($x->allow_literal
)) return false;
2219 if (isset($this->allow_literal
) && $this->allow_literal
!== $x->allow_literal
) return false;
2220 if (sizeof($this->name_arg
) !== sizeof($x->name_arg
)) return false;
2221 foreach (array_map(null, $this->name_arg
, $x->name_arg
) as $v) {
2222 if (!$v[0]->equals($v[1])) return false;
2224 if (sizeof($this->number_arg
) !== sizeof($x->number_arg
)) return false;
2225 foreach (array_map(null, $this->number_arg
, $x->number_arg
) as $v) {
2226 if (!$v[0]->equals($v[1])) return false;
2230 public function shortDebugString($prefix = "") {
2232 if (isset($this->query_string
)) {
2233 $res .= $prefix . "query_string: " . $this->debugFormatString($this->query_string
) . "\n";
2235 if (isset($this->allow_literal
)) {
2236 $res .= $prefix . "allow_literal: " . $this->debugFormatBool($this->allow_literal
) . "\n";
2238 foreach ($this->name_arg
as $value) {
2239 $res .= $prefix . "name_arg <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
2241 foreach ($this->number_arg
as $value) {
2242 $res .= $prefix . "number_arg <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
2248 namespace google\appengine\datastore\v
4 {
2249 class GqlQueryArg
extends \google\net\ProtocolMessage
{
2250 public function getName() {
2251 if (!isset($this->name
)) {
2256 public function setName($val) {
2260 public function clearName() {
2264 public function hasName() {
2265 return isset($this->name
);
2267 public function getValue() {
2268 if (!isset($this->value
)) {
2269 return new \google\appengine\datastore\v
4\
Value();
2271 return $this->value
;
2273 public function mutableValue() {
2274 if (!isset($this->value
)) {
2275 $res = new \google\appengine\datastore\v
4\
Value();
2276 $this->value
= $res;
2279 return $this->value
;
2281 public function clearValue() {
2282 if (isset($this->value
)) {
2283 unset($this->value
);
2286 public function hasValue() {
2287 return isset($this->value
);
2289 public function getCursor() {
2290 if (!isset($this->cursor
)) {
2293 return $this->cursor
;
2295 public function setCursor($val) {
2296 $this->cursor
= $val;
2299 public function clearCursor() {
2300 unset($this->cursor
);
2303 public function hasCursor() {
2304 return isset($this->cursor
);
2306 public function clear() {
2308 $this->clearValue();
2309 $this->clearCursor();
2311 public function byteSizePartial() {
2313 if (isset($this->name
)) {
2315 $res +
= $this->lengthString(strlen($this->name
));
2317 if (isset($this->value
)) {
2319 $res +
= $this->lengthString($this->value
->byteSizePartial());
2321 if (isset($this->cursor
)) {
2323 $res +
= $this->lengthString(strlen($this->cursor
));
2327 public function outputPartial($out) {
2328 if (isset($this->name
)) {
2329 $out->putVarInt32(10);
2330 $out->putPrefixedString($this->name
);
2332 if (isset($this->value
)) {
2333 $out->putVarInt32(18);
2334 $out->putVarInt32($this->value
->byteSizePartial());
2335 $this->value
->outputPartial($out);
2337 if (isset($this->cursor
)) {
2338 $out->putVarInt32(26);
2339 $out->putPrefixedString($this->cursor
);
2342 public function tryMerge($d) {
2343 while($d->avail() > 0) {
2344 $tt = $d->getVarInt32();
2347 $length = $d->getVarInt32();
2348 $this->setName(substr($d->buffer(), $d->pos(), $length));
2352 $length = $d->getVarInt32();
2353 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2355 $this->mutableValue()->tryMerge($tmp);
2358 $length = $d->getVarInt32();
2359 $this->setCursor(substr($d->buffer(), $d->pos(), $length));
2363 throw new \google\net\
ProtocolBufferDecodeError();
2370 public function checkInitialized() {
2371 if (isset($this->value
) && (!$this->value
->isInitialized())) return 'value';
2374 public function mergeFrom($x) {
2375 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
2376 if ($x->hasName()) {
2377 $this->setName($x->getName());
2379 if ($x->hasValue()) {
2380 $this->mutableValue()->mergeFrom($x->getValue());
2382 if ($x->hasCursor()) {
2383 $this->setCursor($x->getCursor());
2386 public function equals($x) {
2387 if ($x === $this) { return true; }
2388 if (isset($this->name
) !== isset($x->name
)) return false;
2389 if (isset($this->name
) && $this->name
!== $x->name
) return false;
2390 if (isset($this->value
) !== isset($x->value
)) return false;
2391 if (isset($this->value
) && !$this->value
->equals($x->value
)) return false;
2392 if (isset($this->cursor
) !== isset($x->cursor
)) return false;
2393 if (isset($this->cursor
) && $this->cursor
!== $x->cursor
) return false;
2396 public function shortDebugString($prefix = "") {
2398 if (isset($this->name
)) {
2399 $res .= $prefix . "name: " . $this->debugFormatString($this->name
) . "\n";
2401 if (isset($this->value
)) {
2402 $res .= $prefix . "value <\n" . $this->value
->shortDebugString($prefix . " ") . $prefix . ">\n";
2404 if (isset($this->cursor
)) {
2405 $res .= $prefix . "cursor: " . $this->debugFormatString($this->cursor
) . "\n";
2411 namespace google\appengine\datastore\v
4\QueryResultBatch
{
2412 class MoreResultsType
{
2413 const NOT_FINISHED
= 1;
2414 const MORE_RESULTS_AFTER_LIMIT
= 2;
2415 const NO_MORE_RESULTS
= 3;
2418 namespace google\appengine\datastore\v
4 {
2419 class QueryResultBatch
extends \google\net\ProtocolMessage
{
2420 private $entity_result = array();
2421 public function getEntityResultType() {
2422 if (!isset($this->entity_result_type
)) {
2425 return $this->entity_result_type
;
2427 public function setEntityResultType($val) {
2428 $this->entity_result_type
= $val;
2431 public function clearEntityResultType() {
2432 unset($this->entity_result_type
);
2435 public function hasEntityResultType() {
2436 return isset($this->entity_result_type
);
2438 public function getEntityResultSize() {
2439 return sizeof($this->entity_result
);
2441 public function getEntityResultList() {
2442 return $this->entity_result
;
2444 public function mutableEntityResult($idx) {
2445 if (!isset($this->entity_result
[$idx])) {
2446 $val = new \google\appengine\datastore\v
4\
EntityResult();
2447 $this->entity_result
[$idx] = $val;
2450 return $this->entity_result
[$idx];
2452 public function getEntityResult($idx) {
2453 if (isset($this->entity_result
[$idx])) {
2454 return $this->entity_result
[$idx];
2456 if ($idx >= end(array_keys($this->entity_result
))) {
2457 throw new \
OutOfRangeException('index out of range: ' +
$idx);
2459 return new \google\appengine\datastore\v
4\
EntityResult();
2461 public function addEntityResult() {
2462 $val = new \google\appengine\datastore\v
4\
EntityResult();
2463 $this->entity_result
[] = $val;
2466 public function clearEntityResult() {
2467 $this->entity_result
= array();
2469 public function getEndCursor() {
2470 if (!isset($this->end_cursor
)) {
2473 return $this->end_cursor
;
2475 public function setEndCursor($val) {
2476 $this->end_cursor
= $val;
2479 public function clearEndCursor() {
2480 unset($this->end_cursor
);
2483 public function hasEndCursor() {
2484 return isset($this->end_cursor
);
2486 public function getMoreResults() {
2487 if (!isset($this->more_results
)) {
2490 return $this->more_results
;
2492 public function setMoreResults($val) {
2493 $this->more_results
= $val;
2496 public function clearMoreResults() {
2497 unset($this->more_results
);
2500 public function hasMoreResults() {
2501 return isset($this->more_results
);
2503 public function getSkippedResults() {
2504 if (!isset($this->skipped_results
)) {
2507 return $this->skipped_results
;
2509 public function setSkippedResults($val) {
2510 $this->skipped_results
= $val;
2513 public function clearSkippedResults() {
2514 unset($this->skipped_results
);
2517 public function hasSkippedResults() {
2518 return isset($this->skipped_results
);
2520 public function getSnapshotVersion() {
2521 if (!isset($this->snapshot_version
)) {
2524 return $this->snapshot_version
;
2526 public function setSnapshotVersion($val) {
2527 if (is_double($val)) {
2528 $this->snapshot_version
= sprintf('%0.0F', $val);
2530 $this->snapshot_version
= $val;
2534 public function clearSnapshotVersion() {
2535 unset($this->snapshot_version
);
2538 public function hasSnapshotVersion() {
2539 return isset($this->snapshot_version
);
2541 public function clear() {
2542 $this->clearEntityResultType();
2543 $this->clearEntityResult();
2544 $this->clearEndCursor();
2545 $this->clearMoreResults();
2546 $this->clearSkippedResults();
2547 $this->clearSnapshotVersion();
2549 public function byteSizePartial() {
2551 if (isset($this->entity_result_type
)) {
2553 $res +
= $this->lengthVarInt64($this->entity_result_type
);
2555 $this->checkProtoArray($this->entity_result
);
2556 $res +
= 1 * sizeof($this->entity_result
);
2557 foreach ($this->entity_result
as $value) {
2558 $res +
= $this->lengthString($value->byteSizePartial());
2560 if (isset($this->end_cursor
)) {
2562 $res +
= $this->lengthString(strlen($this->end_cursor
));
2564 if (isset($this->more_results
)) {
2566 $res +
= $this->lengthVarInt64($this->more_results
);
2568 if (isset($this->skipped_results
)) {
2570 $res +
= $this->lengthVarInt64($this->skipped_results
);
2572 if (isset($this->snapshot_version
)) {
2574 $res +
= $this->lengthVarInt64($this->snapshot_version
);
2578 public function outputPartial($out) {
2579 if (isset($this->entity_result_type
)) {
2580 $out->putVarInt32(8);
2581 $out->putVarInt32($this->entity_result_type
);
2583 $this->checkProtoArray($this->entity_result
);
2584 foreach ($this->entity_result
as $value) {
2585 $out->putVarInt32(18);
2586 $out->putVarInt32($value->byteSizePartial());
2587 $value->outputPartial($out);
2589 if (isset($this->end_cursor
)) {
2590 $out->putVarInt32(34);
2591 $out->putPrefixedString($this->end_cursor
);
2593 if (isset($this->more_results
)) {
2594 $out->putVarInt32(40);
2595 $out->putVarInt32($this->more_results
);
2597 if (isset($this->skipped_results
)) {
2598 $out->putVarInt32(48);
2599 $out->putVarInt32($this->skipped_results
);
2601 if (isset($this->snapshot_version
)) {
2602 $out->putVarInt32(56);
2603 $out->putVarInt64($this->snapshot_version
);
2606 public function tryMerge($d) {
2607 while($d->avail() > 0) {
2608 $tt = $d->getVarInt32();
2611 $this->setEntityResultType($d->getVarInt32());
2614 $length = $d->getVarInt32();
2615 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2617 $this->addEntityResult()->tryMerge($tmp);
2620 $length = $d->getVarInt32();
2621 $this->setEndCursor(substr($d->buffer(), $d->pos(), $length));
2625 $this->setMoreResults($d->getVarInt32());
2628 $this->setSkippedResults($d->getVarInt32());
2631 $this->setSnapshotVersion($d->getVarInt64());
2634 throw new \google\net\
ProtocolBufferDecodeError();
2641 public function checkInitialized() {
2642 if (!isset($this->entity_result_type
)) return 'entity_result_type';
2643 foreach ($this->entity_result
as $value) {
2644 if (!$value->isInitialized()) return 'entity_result';
2646 if (!isset($this->more_results
)) return 'more_results';
2649 public function mergeFrom($x) {
2650 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
2651 if ($x->hasEntityResultType()) {
2652 $this->setEntityResultType($x->getEntityResultType());
2654 foreach ($x->getEntityResultList() as $v) {
2655 $this->addEntityResult()->copyFrom($v);
2657 if ($x->hasEndCursor()) {
2658 $this->setEndCursor($x->getEndCursor());
2660 if ($x->hasMoreResults()) {
2661 $this->setMoreResults($x->getMoreResults());
2663 if ($x->hasSkippedResults()) {
2664 $this->setSkippedResults($x->getSkippedResults());
2666 if ($x->hasSnapshotVersion()) {
2667 $this->setSnapshotVersion($x->getSnapshotVersion());
2670 public function equals($x) {
2671 if ($x === $this) { return true; }
2672 if (isset($this->entity_result_type
) !== isset($x->entity_result_type
)) return false;
2673 if (isset($this->entity_result_type
) && $this->entity_result_type
!== $x->entity_result_type
) return false;
2674 if (sizeof($this->entity_result
) !== sizeof($x->entity_result
)) return false;
2675 foreach (array_map(null, $this->entity_result
, $x->entity_result
) as $v) {
2676 if (!$v[0]->equals($v[1])) return false;
2678 if (isset($this->end_cursor
) !== isset($x->end_cursor
)) return false;
2679 if (isset($this->end_cursor
) && $this->end_cursor
!== $x->end_cursor
) return false;
2680 if (isset($this->more_results
) !== isset($x->more_results
)) return false;
2681 if (isset($this->more_results
) && $this->more_results
!== $x->more_results
) return false;
2682 if (isset($this->skipped_results
) !== isset($x->skipped_results
)) return false;
2683 if (isset($this->skipped_results
) && !$this->integerEquals($this->skipped_results
, $x->skipped_results
)) return false;
2684 if (isset($this->snapshot_version
) !== isset($x->snapshot_version
)) return false;
2685 if (isset($this->snapshot_version
) && !$this->integerEquals($this->snapshot_version
, $x->snapshot_version
)) return false;
2688 public function shortDebugString($prefix = "") {
2690 if (isset($this->entity_result_type
)) {
2691 $res .= $prefix . "entity_result_type: " . ($this->entity_result_type
) . "\n";
2693 foreach ($this->entity_result
as $value) {
2694 $res .= $prefix . "entity_result <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
2696 if (isset($this->end_cursor
)) {
2697 $res .= $prefix . "end_cursor: " . $this->debugFormatString($this->end_cursor
) . "\n";
2699 if (isset($this->more_results
)) {
2700 $res .= $prefix . "more_results: " . ($this->more_results
) . "\n";
2702 if (isset($this->skipped_results
)) {
2703 $res .= $prefix . "skipped_results: " . $this->debugFormatInt32($this->skipped_results
) . "\n";
2705 if (isset($this->snapshot_version
)) {
2706 $res .= $prefix . "snapshot_version: " . $this->debugFormatInt64($this->snapshot_version
) . "\n";
2712 namespace google\appengine\datastore\v
4\Mutation
{
2721 namespace google\appengine\datastore\v
4 {
2722 class Mutation
extends \google\net\ProtocolMessage
{
2723 public function getOp() {
2724 if (!isset($this->op
)) {
2729 public function setOp($val) {
2733 public function clearOp() {
2737 public function hasOp() {
2738 return isset($this->op
);
2740 public function getKey() {
2741 if (!isset($this->key
)) {
2742 return new \google\appengine\datastore\v
4\
Key();
2746 public function mutableKey() {
2747 if (!isset($this->key
)) {
2748 $res = new \google\appengine\datastore\v
4\
Key();
2754 public function clearKey() {
2755 if (isset($this->key
)) {
2759 public function hasKey() {
2760 return isset($this->key
);
2762 public function getEntity() {
2763 if (!isset($this->entity
)) {
2764 return new \google\appengine\datastore\v
4\
Entity();
2766 return $this->entity
;
2768 public function mutableEntity() {
2769 if (!isset($this->entity
)) {
2770 $res = new \google\appengine\datastore\v
4\
Entity();
2771 $this->entity
= $res;
2774 return $this->entity
;
2776 public function clearEntity() {
2777 if (isset($this->entity
)) {
2778 unset($this->entity
);
2781 public function hasEntity() {
2782 return isset($this->entity
);
2784 public function clear() {
2787 $this->clearEntity();
2789 public function byteSizePartial() {
2791 if (isset($this->op
)) {
2793 $res +
= $this->lengthVarInt64($this->op
);
2795 if (isset($this->key
)) {
2797 $res +
= $this->lengthString($this->key
->byteSizePartial());
2799 if (isset($this->entity
)) {
2801 $res +
= $this->lengthString($this->entity
->byteSizePartial());
2805 public function outputPartial($out) {
2806 if (isset($this->op
)) {
2807 $out->putVarInt32(8);
2808 $out->putVarInt32($this->op
);
2810 if (isset($this->key
)) {
2811 $out->putVarInt32(18);
2812 $out->putVarInt32($this->key
->byteSizePartial());
2813 $this->key
->outputPartial($out);
2815 if (isset($this->entity
)) {
2816 $out->putVarInt32(26);
2817 $out->putVarInt32($this->entity
->byteSizePartial());
2818 $this->entity
->outputPartial($out);
2821 public function tryMerge($d) {
2822 while($d->avail() > 0) {
2823 $tt = $d->getVarInt32();
2826 $this->setOp($d->getVarInt32());
2829 $length = $d->getVarInt32();
2830 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2832 $this->mutableKey()->tryMerge($tmp);
2835 $length = $d->getVarInt32();
2836 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2838 $this->mutableEntity()->tryMerge($tmp);
2841 throw new \google\net\
ProtocolBufferDecodeError();
2848 public function checkInitialized() {
2849 if (isset($this->key
) && (!$this->key
->isInitialized())) return 'key';
2850 if (isset($this->entity
) && (!$this->entity
->isInitialized())) return 'entity';
2853 public function mergeFrom($x) {
2854 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
2856 $this->setOp($x->getOp());
2859 $this->mutableKey()->mergeFrom($x->getKey());
2861 if ($x->hasEntity()) {
2862 $this->mutableEntity()->mergeFrom($x->getEntity());
2865 public function equals($x) {
2866 if ($x === $this) { return true; }
2867 if (isset($this->op
) !== isset($x->op
)) return false;
2868 if (isset($this->op
) && $this->op
!== $x->op
) return false;
2869 if (isset($this->key
) !== isset($x->key
)) return false;
2870 if (isset($this->key
) && !$this->key
->equals($x->key
)) return false;
2871 if (isset($this->entity
) !== isset($x->entity
)) return false;
2872 if (isset($this->entity
) && !$this->entity
->equals($x->entity
)) return false;
2875 public function shortDebugString($prefix = "") {
2877 if (isset($this->op
)) {
2878 $res .= $prefix . "op: " . ($this->op
) . "\n";
2880 if (isset($this->key
)) {
2881 $res .= $prefix . "key <\n" . $this->key
->shortDebugString($prefix . " ") . $prefix . ">\n";
2883 if (isset($this->entity
)) {
2884 $res .= $prefix . "entity <\n" . $this->entity
->shortDebugString($prefix . " ") . $prefix . ">\n";
2890 namespace google\appengine\datastore\v
4 {
2891 class MutationResult
extends \google\net\ProtocolMessage
{
2892 public function getKey() {
2893 if (!isset($this->key
)) {
2894 return new \google\appengine\datastore\v
4\
Key();
2898 public function mutableKey() {
2899 if (!isset($this->key
)) {
2900 $res = new \google\appengine\datastore\v
4\
Key();
2906 public function clearKey() {
2907 if (isset($this->key
)) {
2911 public function hasKey() {
2912 return isset($this->key
);
2914 public function getNewVersion() {
2915 if (!isset($this->new_version
)) {
2918 return $this->new_version
;
2920 public function setNewVersion($val) {
2921 if (is_double($val)) {
2922 $this->new_version
= sprintf('%0.0F', $val);
2924 $this->new_version
= $val;
2928 public function clearNewVersion() {
2929 unset($this->new_version
);
2932 public function hasNewVersion() {
2933 return isset($this->new_version
);
2935 public function clear() {
2937 $this->clearNewVersion();
2939 public function byteSizePartial() {
2941 if (isset($this->key
)) {
2943 $res +
= $this->lengthString($this->key
->byteSizePartial());
2945 if (isset($this->new_version
)) {
2947 $res +
= $this->lengthVarInt64($this->new_version
);
2951 public function outputPartial($out) {
2952 if (isset($this->key
)) {
2953 $out->putVarInt32(26);
2954 $out->putVarInt32($this->key
->byteSizePartial());
2955 $this->key
->outputPartial($out);
2957 if (isset($this->new_version
)) {
2958 $out->putVarInt32(32);
2959 $out->putVarInt64($this->new_version
);
2962 public function tryMerge($d) {
2963 while($d->avail() > 0) {
2964 $tt = $d->getVarInt32();
2967 $length = $d->getVarInt32();
2968 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
2970 $this->mutableKey()->tryMerge($tmp);
2973 $this->setNewVersion($d->getVarInt64());
2976 throw new \google\net\
ProtocolBufferDecodeError();
2983 public function checkInitialized() {
2984 if (isset($this->key
) && (!$this->key
->isInitialized())) return 'key';
2987 public function mergeFrom($x) {
2988 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
2990 $this->mutableKey()->mergeFrom($x->getKey());
2992 if ($x->hasNewVersion()) {
2993 $this->setNewVersion($x->getNewVersion());
2996 public function equals($x) {
2997 if ($x === $this) { return true; }
2998 if (isset($this->key
) !== isset($x->key
)) return false;
2999 if (isset($this->key
) && !$this->key
->equals($x->key
)) return false;
3000 if (isset($this->new_version
) !== isset($x->new_version
)) return false;
3001 if (isset($this->new_version
) && !$this->integerEquals($this->new_version
, $x->new_version
)) return false;
3004 public function shortDebugString($prefix = "") {
3006 if (isset($this->key
)) {
3007 $res .= $prefix . "key <\n" . $this->key
->shortDebugString($prefix . " ") . $prefix . ">\n";
3009 if (isset($this->new_version
)) {
3010 $res .= $prefix . "new_version: " . $this->debugFormatInt64($this->new_version
) . "\n";
3016 namespace google\appengine\datastore\v
4 {
3017 class DeprecatedMutation
extends \google\net\ProtocolMessage
{
3018 private $upsert = array();
3019 private $update = array();
3020 private $insert = array();
3021 private $insert_auto_id = array();
3022 private $delete = array();
3023 public function getUpsertSize() {
3024 return sizeof($this->upsert
);
3026 public function getUpsertList() {
3027 return $this->upsert
;
3029 public function mutableUpsert($idx) {
3030 if (!isset($this->upsert
[$idx])) {
3031 $val = new \google\appengine\datastore\v
4\
Entity();
3032 $this->upsert
[$idx] = $val;
3035 return $this->upsert
[$idx];
3037 public function getUpsert($idx) {
3038 if (isset($this->upsert
[$idx])) {
3039 return $this->upsert
[$idx];
3041 if ($idx >= end(array_keys($this->upsert
))) {
3042 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3044 return new \google\appengine\datastore\v
4\
Entity();
3046 public function addUpsert() {
3047 $val = new \google\appengine\datastore\v
4\
Entity();
3048 $this->upsert
[] = $val;
3051 public function clearUpsert() {
3052 $this->upsert
= array();
3054 public function getUpdateSize() {
3055 return sizeof($this->update
);
3057 public function getUpdateList() {
3058 return $this->update
;
3060 public function mutableUpdate($idx) {
3061 if (!isset($this->update
[$idx])) {
3062 $val = new \google\appengine\datastore\v
4\
Entity();
3063 $this->update
[$idx] = $val;
3066 return $this->update
[$idx];
3068 public function getUpdate($idx) {
3069 if (isset($this->update
[$idx])) {
3070 return $this->update
[$idx];
3072 if ($idx >= end(array_keys($this->update
))) {
3073 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3075 return new \google\appengine\datastore\v
4\
Entity();
3077 public function addUpdate() {
3078 $val = new \google\appengine\datastore\v
4\
Entity();
3079 $this->update
[] = $val;
3082 public function clearUpdate() {
3083 $this->update
= array();
3085 public function getInsertSize() {
3086 return sizeof($this->insert
);
3088 public function getInsertList() {
3089 return $this->insert
;
3091 public function mutableInsert($idx) {
3092 if (!isset($this->insert
[$idx])) {
3093 $val = new \google\appengine\datastore\v
4\
Entity();
3094 $this->insert
[$idx] = $val;
3097 return $this->insert
[$idx];
3099 public function getInsert($idx) {
3100 if (isset($this->insert
[$idx])) {
3101 return $this->insert
[$idx];
3103 if ($idx >= end(array_keys($this->insert
))) {
3104 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3106 return new \google\appengine\datastore\v
4\
Entity();
3108 public function addInsert() {
3109 $val = new \google\appengine\datastore\v
4\
Entity();
3110 $this->insert
[] = $val;
3113 public function clearInsert() {
3114 $this->insert
= array();
3116 public function getInsertAutoIdSize() {
3117 return sizeof($this->insert_auto_id
);
3119 public function getInsertAutoIdList() {
3120 return $this->insert_auto_id
;
3122 public function mutableInsertAutoId($idx) {
3123 if (!isset($this->insert_auto_id
[$idx])) {
3124 $val = new \google\appengine\datastore\v
4\
Entity();
3125 $this->insert_auto_id
[$idx] = $val;
3128 return $this->insert_auto_id
[$idx];
3130 public function getInsertAutoId($idx) {
3131 if (isset($this->insert_auto_id
[$idx])) {
3132 return $this->insert_auto_id
[$idx];
3134 if ($idx >= end(array_keys($this->insert_auto_id
))) {
3135 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3137 return new \google\appengine\datastore\v
4\
Entity();
3139 public function addInsertAutoId() {
3140 $val = new \google\appengine\datastore\v
4\
Entity();
3141 $this->insert_auto_id
[] = $val;
3144 public function clearInsertAutoId() {
3145 $this->insert_auto_id
= array();
3147 public function getDeleteSize() {
3148 return sizeof($this->delete
);
3150 public function getDeleteList() {
3151 return $this->delete
;
3153 public function mutableDelete($idx) {
3154 if (!isset($this->delete
[$idx])) {
3155 $val = new \google\appengine\datastore\v
4\
Key();
3156 $this->delete
[$idx] = $val;
3159 return $this->delete
[$idx];
3161 public function getDelete($idx) {
3162 if (isset($this->delete
[$idx])) {
3163 return $this->delete
[$idx];
3165 if ($idx >= end(array_keys($this->delete
))) {
3166 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3168 return new \google\appengine\datastore\v
4\
Key();
3170 public function addDelete() {
3171 $val = new \google\appengine\datastore\v
4\
Key();
3172 $this->delete
[] = $val;
3175 public function clearDelete() {
3176 $this->delete
= array();
3178 public function getForce() {
3179 if (!isset($this->force
)) {
3182 return $this->force
;
3184 public function setForce($val) {
3185 $this->force
= $val;
3188 public function clearForce() {
3189 unset($this->force
);
3192 public function hasForce() {
3193 return isset($this->force
);
3195 public function clear() {
3196 $this->clearUpsert();
3197 $this->clearUpdate();
3198 $this->clearInsert();
3199 $this->clearInsertAutoId();
3200 $this->clearDelete();
3201 $this->clearForce();
3203 public function byteSizePartial() {
3205 $this->checkProtoArray($this->upsert
);
3206 $res +
= 1 * sizeof($this->upsert
);
3207 foreach ($this->upsert
as $value) {
3208 $res +
= $this->lengthString($value->byteSizePartial());
3210 $this->checkProtoArray($this->update
);
3211 $res +
= 1 * sizeof($this->update
);
3212 foreach ($this->update
as $value) {
3213 $res +
= $this->lengthString($value->byteSizePartial());
3215 $this->checkProtoArray($this->insert
);
3216 $res +
= 1 * sizeof($this->insert
);
3217 foreach ($this->insert
as $value) {
3218 $res +
= $this->lengthString($value->byteSizePartial());
3220 $this->checkProtoArray($this->insert_auto_id
);
3221 $res +
= 1 * sizeof($this->insert_auto_id
);
3222 foreach ($this->insert_auto_id
as $value) {
3223 $res +
= $this->lengthString($value->byteSizePartial());
3225 $this->checkProtoArray($this->delete
);
3226 $res +
= 1 * sizeof($this->delete
);
3227 foreach ($this->delete
as $value) {
3228 $res +
= $this->lengthString($value->byteSizePartial());
3230 if (isset($this->force
)) {
3235 public function outputPartial($out) {
3236 $this->checkProtoArray($this->upsert
);
3237 foreach ($this->upsert
as $value) {
3238 $out->putVarInt32(10);
3239 $out->putVarInt32($value->byteSizePartial());
3240 $value->outputPartial($out);
3242 $this->checkProtoArray($this->update
);
3243 foreach ($this->update
as $value) {
3244 $out->putVarInt32(18);
3245 $out->putVarInt32($value->byteSizePartial());
3246 $value->outputPartial($out);
3248 $this->checkProtoArray($this->insert
);
3249 foreach ($this->insert
as $value) {
3250 $out->putVarInt32(26);
3251 $out->putVarInt32($value->byteSizePartial());
3252 $value->outputPartial($out);
3254 $this->checkProtoArray($this->insert_auto_id
);
3255 foreach ($this->insert_auto_id
as $value) {
3256 $out->putVarInt32(34);
3257 $out->putVarInt32($value->byteSizePartial());
3258 $value->outputPartial($out);
3260 $this->checkProtoArray($this->delete
);
3261 foreach ($this->delete
as $value) {
3262 $out->putVarInt32(42);
3263 $out->putVarInt32($value->byteSizePartial());
3264 $value->outputPartial($out);
3266 if (isset($this->force
)) {
3267 $out->putVarInt32(48);
3268 $out->putBoolean($this->force
);
3271 public function tryMerge($d) {
3272 while($d->avail() > 0) {
3273 $tt = $d->getVarInt32();
3276 $length = $d->getVarInt32();
3277 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3279 $this->addUpsert()->tryMerge($tmp);
3282 $length = $d->getVarInt32();
3283 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3285 $this->addUpdate()->tryMerge($tmp);
3288 $length = $d->getVarInt32();
3289 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3291 $this->addInsert()->tryMerge($tmp);
3294 $length = $d->getVarInt32();
3295 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3297 $this->addInsertAutoId()->tryMerge($tmp);
3300 $length = $d->getVarInt32();
3301 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3303 $this->addDelete()->tryMerge($tmp);
3306 $this->setForce($d->getBoolean());
3309 throw new \google\net\
ProtocolBufferDecodeError();
3316 public function checkInitialized() {
3317 foreach ($this->upsert
as $value) {
3318 if (!$value->isInitialized()) return 'upsert';
3320 foreach ($this->update
as $value) {
3321 if (!$value->isInitialized()) return 'update';
3323 foreach ($this->insert
as $value) {
3324 if (!$value->isInitialized()) return 'insert';
3326 foreach ($this->insert_auto_id
as $value) {
3327 if (!$value->isInitialized()) return 'insert_auto_id';
3329 foreach ($this->delete
as $value) {
3330 if (!$value->isInitialized()) return 'delete';
3334 public function mergeFrom($x) {
3335 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
3336 foreach ($x->getUpsertList() as $v) {
3337 $this->addUpsert()->copyFrom($v);
3339 foreach ($x->getUpdateList() as $v) {
3340 $this->addUpdate()->copyFrom($v);
3342 foreach ($x->getInsertList() as $v) {
3343 $this->addInsert()->copyFrom($v);
3345 foreach ($x->getInsertAutoIdList() as $v) {
3346 $this->addInsertAutoId()->copyFrom($v);
3348 foreach ($x->getDeleteList() as $v) {
3349 $this->addDelete()->copyFrom($v);
3351 if ($x->hasForce()) {
3352 $this->setForce($x->getForce());
3355 public function equals($x) {
3356 if ($x === $this) { return true; }
3357 if (sizeof($this->upsert
) !== sizeof($x->upsert
)) return false;
3358 foreach (array_map(null, $this->upsert
, $x->upsert
) as $v) {
3359 if (!$v[0]->equals($v[1])) return false;
3361 if (sizeof($this->update
) !== sizeof($x->update
)) return false;
3362 foreach (array_map(null, $this->update
, $x->update
) as $v) {
3363 if (!$v[0]->equals($v[1])) return false;
3365 if (sizeof($this->insert
) !== sizeof($x->insert
)) return false;
3366 foreach (array_map(null, $this->insert
, $x->insert
) as $v) {
3367 if (!$v[0]->equals($v[1])) return false;
3369 if (sizeof($this->insert_auto_id
) !== sizeof($x->insert_auto_id
)) return false;
3370 foreach (array_map(null, $this->insert_auto_id
, $x->insert_auto_id
) as $v) {
3371 if (!$v[0]->equals($v[1])) return false;
3373 if (sizeof($this->delete
) !== sizeof($x->delete
)) return false;
3374 foreach (array_map(null, $this->delete
, $x->delete
) as $v) {
3375 if (!$v[0]->equals($v[1])) return false;
3377 if (isset($this->force
) !== isset($x->force
)) return false;
3378 if (isset($this->force
) && $this->force
!== $x->force
) return false;
3381 public function shortDebugString($prefix = "") {
3383 foreach ($this->upsert
as $value) {
3384 $res .= $prefix . "upsert <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3386 foreach ($this->update
as $value) {
3387 $res .= $prefix . "update <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3389 foreach ($this->insert
as $value) {
3390 $res .= $prefix . "insert <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3392 foreach ($this->insert_auto_id
as $value) {
3393 $res .= $prefix . "insert_auto_id <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3395 foreach ($this->delete
as $value) {
3396 $res .= $prefix . "delete <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3398 if (isset($this->force
)) {
3399 $res .= $prefix . "force: " . $this->debugFormatBool($this->force
) . "\n";
3405 namespace google\appengine\datastore\v
4 {
3406 class DeprecatedMutationResult
extends \google\net\ProtocolMessage
{
3407 private $insert_auto_id_key = array();
3408 private $upsert_version = array();
3409 private $update_version = array();
3410 private $insert_version = array();
3411 private $insert_auto_id_version = array();
3412 private $delete_version = array();
3413 public function getIndexUpdates() {
3414 if (!isset($this->index_updates
)) {
3417 return $this->index_updates
;
3419 public function setIndexUpdates($val) {
3420 $this->index_updates
= $val;
3423 public function clearIndexUpdates() {
3424 unset($this->index_updates
);
3427 public function hasIndexUpdates() {
3428 return isset($this->index_updates
);
3430 public function getInsertAutoIdKeySize() {
3431 return sizeof($this->insert_auto_id_key
);
3433 public function getInsertAutoIdKeyList() {
3434 return $this->insert_auto_id_key
;
3436 public function mutableInsertAutoIdKey($idx) {
3437 if (!isset($this->insert_auto_id_key
[$idx])) {
3438 $val = new \google\appengine\datastore\v
4\
Key();
3439 $this->insert_auto_id_key
[$idx] = $val;
3442 return $this->insert_auto_id_key
[$idx];
3444 public function getInsertAutoIdKey($idx) {
3445 if (isset($this->insert_auto_id_key
[$idx])) {
3446 return $this->insert_auto_id_key
[$idx];
3448 if ($idx >= end(array_keys($this->insert_auto_id_key
))) {
3449 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3451 return new \google\appengine\datastore\v
4\
Key();
3453 public function addInsertAutoIdKey() {
3454 $val = new \google\appengine\datastore\v
4\
Key();
3455 $this->insert_auto_id_key
[] = $val;
3458 public function clearInsertAutoIdKey() {
3459 $this->insert_auto_id_key
= array();
3461 public function getUpsertVersionSize() {
3462 return sizeof($this->upsert_version
);
3464 public function getUpsertVersionList() {
3465 return $this->upsert_version
;
3467 public function getUpsertVersion($idx) {
3468 return $this->upsert_version
[$idx];
3470 public function setUpsertVersion($idx, $val) {
3471 if (is_double($val)) {
3472 $this->upsert_version
[$idx] = sprintf('%0.0F', $val);
3474 $this->upsert_version
[$idx] = $val;
3478 public function addUpsertVersion($val) {
3479 if (is_double($val)) {
3480 $this->upsert_version
[] = sprintf('%0.0F', $val);
3482 $this->upsert_version
[] = $val;
3486 public function clearUpsertVersion() {
3487 $this->upsert_version
= array();
3489 public function getUpdateVersionSize() {
3490 return sizeof($this->update_version
);
3492 public function getUpdateVersionList() {
3493 return $this->update_version
;
3495 public function getUpdateVersion($idx) {
3496 return $this->update_version
[$idx];
3498 public function setUpdateVersion($idx, $val) {
3499 if (is_double($val)) {
3500 $this->update_version
[$idx] = sprintf('%0.0F', $val);
3502 $this->update_version
[$idx] = $val;
3506 public function addUpdateVersion($val) {
3507 if (is_double($val)) {
3508 $this->update_version
[] = sprintf('%0.0F', $val);
3510 $this->update_version
[] = $val;
3514 public function clearUpdateVersion() {
3515 $this->update_version
= array();
3517 public function getInsertVersionSize() {
3518 return sizeof($this->insert_version
);
3520 public function getInsertVersionList() {
3521 return $this->insert_version
;
3523 public function getInsertVersion($idx) {
3524 return $this->insert_version
[$idx];
3526 public function setInsertVersion($idx, $val) {
3527 if (is_double($val)) {
3528 $this->insert_version
[$idx] = sprintf('%0.0F', $val);
3530 $this->insert_version
[$idx] = $val;
3534 public function addInsertVersion($val) {
3535 if (is_double($val)) {
3536 $this->insert_version
[] = sprintf('%0.0F', $val);
3538 $this->insert_version
[] = $val;
3542 public function clearInsertVersion() {
3543 $this->insert_version
= array();
3545 public function getInsertAutoIdVersionSize() {
3546 return sizeof($this->insert_auto_id_version
);
3548 public function getInsertAutoIdVersionList() {
3549 return $this->insert_auto_id_version
;
3551 public function getInsertAutoIdVersion($idx) {
3552 return $this->insert_auto_id_version
[$idx];
3554 public function setInsertAutoIdVersion($idx, $val) {
3555 if (is_double($val)) {
3556 $this->insert_auto_id_version
[$idx] = sprintf('%0.0F', $val);
3558 $this->insert_auto_id_version
[$idx] = $val;
3562 public function addInsertAutoIdVersion($val) {
3563 if (is_double($val)) {
3564 $this->insert_auto_id_version
[] = sprintf('%0.0F', $val);
3566 $this->insert_auto_id_version
[] = $val;
3570 public function clearInsertAutoIdVersion() {
3571 $this->insert_auto_id_version
= array();
3573 public function getDeleteVersionSize() {
3574 return sizeof($this->delete_version
);
3576 public function getDeleteVersionList() {
3577 return $this->delete_version
;
3579 public function getDeleteVersion($idx) {
3580 return $this->delete_version
[$idx];
3582 public function setDeleteVersion($idx, $val) {
3583 if (is_double($val)) {
3584 $this->delete_version
[$idx] = sprintf('%0.0F', $val);
3586 $this->delete_version
[$idx] = $val;
3590 public function addDeleteVersion($val) {
3591 if (is_double($val)) {
3592 $this->delete_version
[] = sprintf('%0.0F', $val);
3594 $this->delete_version
[] = $val;
3598 public function clearDeleteVersion() {
3599 $this->delete_version
= array();
3601 public function clear() {
3602 $this->clearIndexUpdates();
3603 $this->clearInsertAutoIdKey();
3604 $this->clearUpsertVersion();
3605 $this->clearUpdateVersion();
3606 $this->clearInsertVersion();
3607 $this->clearInsertAutoIdVersion();
3608 $this->clearDeleteVersion();
3610 public function byteSizePartial() {
3612 if (isset($this->index_updates
)) {
3614 $res +
= $this->lengthVarInt64($this->index_updates
);
3616 $this->checkProtoArray($this->insert_auto_id_key
);
3617 $res +
= 1 * sizeof($this->insert_auto_id_key
);
3618 foreach ($this->insert_auto_id_key
as $value) {
3619 $res +
= $this->lengthString($value->byteSizePartial());
3621 $this->checkProtoArray($this->upsert_version
);
3622 $res +
= 1 * sizeof($this->upsert_version
);
3623 foreach ($this->upsert_version
as $value) {
3624 $res +
= $this->lengthVarInt64($value);
3626 $this->checkProtoArray($this->update_version
);
3627 $res +
= 1 * sizeof($this->update_version
);
3628 foreach ($this->update_version
as $value) {
3629 $res +
= $this->lengthVarInt64($value);
3631 $this->checkProtoArray($this->insert_version
);
3632 $res +
= 1 * sizeof($this->insert_version
);
3633 foreach ($this->insert_version
as $value) {
3634 $res +
= $this->lengthVarInt64($value);
3636 $this->checkProtoArray($this->insert_auto_id_version
);
3637 $res +
= 1 * sizeof($this->insert_auto_id_version
);
3638 foreach ($this->insert_auto_id_version
as $value) {
3639 $res +
= $this->lengthVarInt64($value);
3641 $this->checkProtoArray($this->delete_version
);
3642 $res +
= 1 * sizeof($this->delete_version
);
3643 foreach ($this->delete_version
as $value) {
3644 $res +
= $this->lengthVarInt64($value);
3648 public function outputPartial($out) {
3649 if (isset($this->index_updates
)) {
3650 $out->putVarInt32(8);
3651 $out->putVarInt32($this->index_updates
);
3653 $this->checkProtoArray($this->insert_auto_id_key
);
3654 foreach ($this->insert_auto_id_key
as $value) {
3655 $out->putVarInt32(18);
3656 $out->putVarInt32($value->byteSizePartial());
3657 $value->outputPartial($out);
3659 $this->checkProtoArray($this->upsert_version
);
3660 foreach ($this->upsert_version
as $value) {
3661 $out->putVarInt32(24);
3662 $out->putVarInt64($value);
3664 $this->checkProtoArray($this->update_version
);
3665 foreach ($this->update_version
as $value) {
3666 $out->putVarInt32(32);
3667 $out->putVarInt64($value);
3669 $this->checkProtoArray($this->insert_version
);
3670 foreach ($this->insert_version
as $value) {
3671 $out->putVarInt32(40);
3672 $out->putVarInt64($value);
3674 $this->checkProtoArray($this->insert_auto_id_version
);
3675 foreach ($this->insert_auto_id_version
as $value) {
3676 $out->putVarInt32(48);
3677 $out->putVarInt64($value);
3679 $this->checkProtoArray($this->delete_version
);
3680 foreach ($this->delete_version
as $value) {
3681 $out->putVarInt32(56);
3682 $out->putVarInt64($value);
3685 public function tryMerge($d) {
3686 while($d->avail() > 0) {
3687 $tt = $d->getVarInt32();
3690 $this->setIndexUpdates($d->getVarInt32());
3693 $length = $d->getVarInt32();
3694 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
3696 $this->addInsertAutoIdKey()->tryMerge($tmp);
3699 $this->addUpsertVersion($d->getVarInt64());
3702 $this->addUpdateVersion($d->getVarInt64());
3705 $this->addInsertVersion($d->getVarInt64());
3708 $this->addInsertAutoIdVersion($d->getVarInt64());
3711 $this->addDeleteVersion($d->getVarInt64());
3714 throw new \google\net\
ProtocolBufferDecodeError();
3721 public function checkInitialized() {
3722 if (!isset($this->index_updates
)) return 'index_updates';
3723 foreach ($this->insert_auto_id_key
as $value) {
3724 if (!$value->isInitialized()) return 'insert_auto_id_key';
3728 public function mergeFrom($x) {
3729 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
3730 if ($x->hasIndexUpdates()) {
3731 $this->setIndexUpdates($x->getIndexUpdates());
3733 foreach ($x->getInsertAutoIdKeyList() as $v) {
3734 $this->addInsertAutoIdKey()->copyFrom($v);
3736 foreach ($x->getUpsertVersionList() as $v) {
3737 $this->addUpsertVersion($v);
3739 foreach ($x->getUpdateVersionList() as $v) {
3740 $this->addUpdateVersion($v);
3742 foreach ($x->getInsertVersionList() as $v) {
3743 $this->addInsertVersion($v);
3745 foreach ($x->getInsertAutoIdVersionList() as $v) {
3746 $this->addInsertAutoIdVersion($v);
3748 foreach ($x->getDeleteVersionList() as $v) {
3749 $this->addDeleteVersion($v);
3752 public function equals($x) {
3753 if ($x === $this) { return true; }
3754 if (isset($this->index_updates
) !== isset($x->index_updates
)) return false;
3755 if (isset($this->index_updates
) && !$this->integerEquals($this->index_updates
, $x->index_updates
)) return false;
3756 if (sizeof($this->insert_auto_id_key
) !== sizeof($x->insert_auto_id_key
)) return false;
3757 foreach (array_map(null, $this->insert_auto_id_key
, $x->insert_auto_id_key
) as $v) {
3758 if (!$v[0]->equals($v[1])) return false;
3760 if (sizeof($this->upsert_version
) !== sizeof($x->upsert_version
)) return false;
3761 foreach (array_map(null, $this->upsert_version
, $x->upsert_version
) as $v) {
3762 if (!$this->integerEquals($v[0], $v[1])) return false;
3764 if (sizeof($this->update_version
) !== sizeof($x->update_version
)) return false;
3765 foreach (array_map(null, $this->update_version
, $x->update_version
) as $v) {
3766 if (!$this->integerEquals($v[0], $v[1])) return false;
3768 if (sizeof($this->insert_version
) !== sizeof($x->insert_version
)) return false;
3769 foreach (array_map(null, $this->insert_version
, $x->insert_version
) as $v) {
3770 if (!$this->integerEquals($v[0], $v[1])) return false;
3772 if (sizeof($this->insert_auto_id_version
) !== sizeof($x->insert_auto_id_version
)) return false;
3773 foreach (array_map(null, $this->insert_auto_id_version
, $x->insert_auto_id_version
) as $v) {
3774 if (!$this->integerEquals($v[0], $v[1])) return false;
3776 if (sizeof($this->delete_version
) !== sizeof($x->delete_version
)) return false;
3777 foreach (array_map(null, $this->delete_version
, $x->delete_version
) as $v) {
3778 if (!$this->integerEquals($v[0], $v[1])) return false;
3782 public function shortDebugString($prefix = "") {
3784 if (isset($this->index_updates
)) {
3785 $res .= $prefix . "index_updates: " . $this->debugFormatInt32($this->index_updates
) . "\n";
3787 foreach ($this->insert_auto_id_key
as $value) {
3788 $res .= $prefix . "insert_auto_id_key <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
3790 foreach ($this->upsert_version
as $value) {
3791 $res .= $prefix . "upsert_version: " . $this->debugFormatInt64($value) . "\n";
3793 foreach ($this->update_version
as $value) {
3794 $res .= $prefix . "update_version: " . $this->debugFormatInt64($value) . "\n";
3796 foreach ($this->insert_version
as $value) {
3797 $res .= $prefix . "insert_version: " . $this->debugFormatInt64($value) . "\n";
3799 foreach ($this->insert_auto_id_version
as $value) {
3800 $res .= $prefix . "insert_auto_id_version: " . $this->debugFormatInt64($value) . "\n";
3802 foreach ($this->delete_version
as $value) {
3803 $res .= $prefix . "delete_version: " . $this->debugFormatInt64($value) . "\n";
3809 namespace google\appengine\datastore\v
4\ReadOptions
{
3810 class ReadConsistency
{
3816 namespace google\appengine\datastore\v
4 {
3817 class ReadOptions
extends \google\net\ProtocolMessage
{
3818 public function getReadConsistency() {
3819 if (!isset($this->read_consistency
)) {
3822 return $this->read_consistency
;
3824 public function setReadConsistency($val) {
3825 $this->read_consistency
= $val;
3828 public function clearReadConsistency() {
3829 unset($this->read_consistency
);
3832 public function hasReadConsistency() {
3833 return isset($this->read_consistency
);
3835 public function getTransaction() {
3836 if (!isset($this->transaction
)) {
3839 return $this->transaction
;
3841 public function setTransaction($val) {
3842 $this->transaction
= $val;
3845 public function clearTransaction() {
3846 unset($this->transaction
);
3849 public function hasTransaction() {
3850 return isset($this->transaction
);
3852 public function clear() {
3853 $this->clearReadConsistency();
3854 $this->clearTransaction();
3856 public function byteSizePartial() {
3858 if (isset($this->read_consistency
)) {
3860 $res +
= $this->lengthVarInt64($this->read_consistency
);
3862 if (isset($this->transaction
)) {
3864 $res +
= $this->lengthString(strlen($this->transaction
));
3868 public function outputPartial($out) {
3869 if (isset($this->read_consistency
)) {
3870 $out->putVarInt32(8);
3871 $out->putVarInt32($this->read_consistency
);
3873 if (isset($this->transaction
)) {
3874 $out->putVarInt32(18);
3875 $out->putPrefixedString($this->transaction
);
3878 public function tryMerge($d) {
3879 while($d->avail() > 0) {
3880 $tt = $d->getVarInt32();
3883 $this->setReadConsistency($d->getVarInt32());
3886 $length = $d->getVarInt32();
3887 $this->setTransaction(substr($d->buffer(), $d->pos(), $length));
3891 throw new \google\net\
ProtocolBufferDecodeError();
3898 public function checkInitialized() {
3901 public function mergeFrom($x) {
3902 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
3903 if ($x->hasReadConsistency()) {
3904 $this->setReadConsistency($x->getReadConsistency());
3906 if ($x->hasTransaction()) {
3907 $this->setTransaction($x->getTransaction());
3910 public function equals($x) {
3911 if ($x === $this) { return true; }
3912 if (isset($this->read_consistency
) !== isset($x->read_consistency
)) return false;
3913 if (isset($this->read_consistency
) && $this->read_consistency
!== $x->read_consistency
) return false;
3914 if (isset($this->transaction
) !== isset($x->transaction
)) return false;
3915 if (isset($this->transaction
) && $this->transaction
!== $x->transaction
) return false;
3918 public function shortDebugString($prefix = "") {
3920 if (isset($this->read_consistency
)) {
3921 $res .= $prefix . "read_consistency: " . ($this->read_consistency
) . "\n";
3923 if (isset($this->transaction
)) {
3924 $res .= $prefix . "transaction: " . $this->debugFormatString($this->transaction
) . "\n";
3930 namespace google\appengine\datastore\v
4 {
3931 class LookupRequest
extends \google\net\ProtocolMessage
{
3932 private $key = array();
3933 public function getReadOptions() {
3934 if (!isset($this->read_options
)) {
3935 return new \google\appengine\datastore\v
4\
ReadOptions();
3937 return $this->read_options
;
3939 public function mutableReadOptions() {
3940 if (!isset($this->read_options
)) {
3941 $res = new \google\appengine\datastore\v
4\
ReadOptions();
3942 $this->read_options
= $res;
3945 return $this->read_options
;
3947 public function clearReadOptions() {
3948 if (isset($this->read_options
)) {
3949 unset($this->read_options
);
3952 public function hasReadOptions() {
3953 return isset($this->read_options
);
3955 public function getKeySize() {
3956 return sizeof($this->key
);
3958 public function getKeyList() {
3961 public function mutableKey($idx) {
3962 if (!isset($this->key
[$idx])) {
3963 $val = new \google\appengine\datastore\v
4\
Key();
3964 $this->key
[$idx] = $val;
3967 return $this->key
[$idx];
3969 public function getKey($idx) {
3970 if (isset($this->key
[$idx])) {
3971 return $this->key
[$idx];
3973 if ($idx >= end(array_keys($this->key
))) {
3974 throw new \
OutOfRangeException('index out of range: ' +
$idx);
3976 return new \google\appengine\datastore\v
4\
Key();
3978 public function addKey() {
3979 $val = new \google\appengine\datastore\v
4\
Key();
3980 $this->key
[] = $val;
3983 public function clearKey() {
3984 $this->key
= array();
3986 public function clear() {
3987 $this->clearReadOptions();
3990 public function byteSizePartial() {
3992 if (isset($this->read_options
)) {
3994 $res +
= $this->lengthString($this->read_options
->byteSizePartial());
3996 $this->checkProtoArray($this->key
);
3997 $res +
= 1 * sizeof($this->key
);
3998 foreach ($this->key
as $value) {
3999 $res +
= $this->lengthString($value->byteSizePartial());
4003 public function outputPartial($out) {
4004 if (isset($this->read_options
)) {
4005 $out->putVarInt32(10);
4006 $out->putVarInt32($this->read_options
->byteSizePartial());
4007 $this->read_options
->outputPartial($out);
4009 $this->checkProtoArray($this->key
);
4010 foreach ($this->key
as $value) {
4011 $out->putVarInt32(26);
4012 $out->putVarInt32($value->byteSizePartial());
4013 $value->outputPartial($out);
4016 public function tryMerge($d) {
4017 while($d->avail() > 0) {
4018 $tt = $d->getVarInt32();
4021 $length = $d->getVarInt32();
4022 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4024 $this->mutableReadOptions()->tryMerge($tmp);
4027 $length = $d->getVarInt32();
4028 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4030 $this->addKey()->tryMerge($tmp);
4033 throw new \google\net\
ProtocolBufferDecodeError();
4040 public function checkInitialized() {
4041 if (isset($this->read_options
) && (!$this->read_options
->isInitialized())) return 'read_options';
4042 foreach ($this->key
as $value) {
4043 if (!$value->isInitialized()) return 'key';
4047 public function mergeFrom($x) {
4048 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4049 if ($x->hasReadOptions()) {
4050 $this->mutableReadOptions()->mergeFrom($x->getReadOptions());
4052 foreach ($x->getKeyList() as $v) {
4053 $this->addKey()->copyFrom($v);
4056 public function equals($x) {
4057 if ($x === $this) { return true; }
4058 if (isset($this->read_options
) !== isset($x->read_options
)) return false;
4059 if (isset($this->read_options
) && !$this->read_options
->equals($x->read_options
)) return false;
4060 if (sizeof($this->key
) !== sizeof($x->key
)) return false;
4061 foreach (array_map(null, $this->key
, $x->key
) as $v) {
4062 if (!$v[0]->equals($v[1])) return false;
4066 public function shortDebugString($prefix = "") {
4068 if (isset($this->read_options
)) {
4069 $res .= $prefix . "read_options <\n" . $this->read_options
->shortDebugString($prefix . " ") . $prefix . ">\n";
4071 foreach ($this->key
as $value) {
4072 $res .= $prefix . "key <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4078 namespace google\appengine\datastore\v
4 {
4079 class LookupResponse
extends \google\net\ProtocolMessage
{
4080 private $found = array();
4081 private $missing = array();
4082 private $deferred = array();
4083 public function getFoundSize() {
4084 return sizeof($this->found
);
4086 public function getFoundList() {
4087 return $this->found
;
4089 public function mutableFound($idx) {
4090 if (!isset($this->found
[$idx])) {
4091 $val = new \google\appengine\datastore\v
4\
EntityResult();
4092 $this->found
[$idx] = $val;
4095 return $this->found
[$idx];
4097 public function getFound($idx) {
4098 if (isset($this->found
[$idx])) {
4099 return $this->found
[$idx];
4101 if ($idx >= end(array_keys($this->found
))) {
4102 throw new \
OutOfRangeException('index out of range: ' +
$idx);
4104 return new \google\appengine\datastore\v
4\
EntityResult();
4106 public function addFound() {
4107 $val = new \google\appengine\datastore\v
4\
EntityResult();
4108 $this->found
[] = $val;
4111 public function clearFound() {
4112 $this->found
= array();
4114 public function getMissingSize() {
4115 return sizeof($this->missing
);
4117 public function getMissingList() {
4118 return $this->missing
;
4120 public function mutableMissing($idx) {
4121 if (!isset($this->missing
[$idx])) {
4122 $val = new \google\appengine\datastore\v
4\
EntityResult();
4123 $this->missing
[$idx] = $val;
4126 return $this->missing
[$idx];
4128 public function getMissing($idx) {
4129 if (isset($this->missing
[$idx])) {
4130 return $this->missing
[$idx];
4132 if ($idx >= end(array_keys($this->missing
))) {
4133 throw new \
OutOfRangeException('index out of range: ' +
$idx);
4135 return new \google\appengine\datastore\v
4\
EntityResult();
4137 public function addMissing() {
4138 $val = new \google\appengine\datastore\v
4\
EntityResult();
4139 $this->missing
[] = $val;
4142 public function clearMissing() {
4143 $this->missing
= array();
4145 public function getDeferredSize() {
4146 return sizeof($this->deferred
);
4148 public function getDeferredList() {
4149 return $this->deferred
;
4151 public function mutableDeferred($idx) {
4152 if (!isset($this->deferred
[$idx])) {
4153 $val = new \google\appengine\datastore\v
4\
Key();
4154 $this->deferred
[$idx] = $val;
4157 return $this->deferred
[$idx];
4159 public function getDeferred($idx) {
4160 if (isset($this->deferred
[$idx])) {
4161 return $this->deferred
[$idx];
4163 if ($idx >= end(array_keys($this->deferred
))) {
4164 throw new \
OutOfRangeException('index out of range: ' +
$idx);
4166 return new \google\appengine\datastore\v
4\
Key();
4168 public function addDeferred() {
4169 $val = new \google\appengine\datastore\v
4\
Key();
4170 $this->deferred
[] = $val;
4173 public function clearDeferred() {
4174 $this->deferred
= array();
4176 public function clear() {
4177 $this->clearFound();
4178 $this->clearMissing();
4179 $this->clearDeferred();
4181 public function byteSizePartial() {
4183 $this->checkProtoArray($this->found
);
4184 $res +
= 1 * sizeof($this->found
);
4185 foreach ($this->found
as $value) {
4186 $res +
= $this->lengthString($value->byteSizePartial());
4188 $this->checkProtoArray($this->missing
);
4189 $res +
= 1 * sizeof($this->missing
);
4190 foreach ($this->missing
as $value) {
4191 $res +
= $this->lengthString($value->byteSizePartial());
4193 $this->checkProtoArray($this->deferred
);
4194 $res +
= 1 * sizeof($this->deferred
);
4195 foreach ($this->deferred
as $value) {
4196 $res +
= $this->lengthString($value->byteSizePartial());
4200 public function outputPartial($out) {
4201 $this->checkProtoArray($this->found
);
4202 foreach ($this->found
as $value) {
4203 $out->putVarInt32(10);
4204 $out->putVarInt32($value->byteSizePartial());
4205 $value->outputPartial($out);
4207 $this->checkProtoArray($this->missing
);
4208 foreach ($this->missing
as $value) {
4209 $out->putVarInt32(18);
4210 $out->putVarInt32($value->byteSizePartial());
4211 $value->outputPartial($out);
4213 $this->checkProtoArray($this->deferred
);
4214 foreach ($this->deferred
as $value) {
4215 $out->putVarInt32(26);
4216 $out->putVarInt32($value->byteSizePartial());
4217 $value->outputPartial($out);
4220 public function tryMerge($d) {
4221 while($d->avail() > 0) {
4222 $tt = $d->getVarInt32();
4225 $length = $d->getVarInt32();
4226 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4228 $this->addFound()->tryMerge($tmp);
4231 $length = $d->getVarInt32();
4232 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4234 $this->addMissing()->tryMerge($tmp);
4237 $length = $d->getVarInt32();
4238 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4240 $this->addDeferred()->tryMerge($tmp);
4243 throw new \google\net\
ProtocolBufferDecodeError();
4250 public function checkInitialized() {
4251 foreach ($this->found
as $value) {
4252 if (!$value->isInitialized()) return 'found';
4254 foreach ($this->missing
as $value) {
4255 if (!$value->isInitialized()) return 'missing';
4257 foreach ($this->deferred
as $value) {
4258 if (!$value->isInitialized()) return 'deferred';
4262 public function mergeFrom($x) {
4263 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4264 foreach ($x->getFoundList() as $v) {
4265 $this->addFound()->copyFrom($v);
4267 foreach ($x->getMissingList() as $v) {
4268 $this->addMissing()->copyFrom($v);
4270 foreach ($x->getDeferredList() as $v) {
4271 $this->addDeferred()->copyFrom($v);
4274 public function equals($x) {
4275 if ($x === $this) { return true; }
4276 if (sizeof($this->found
) !== sizeof($x->found
)) return false;
4277 foreach (array_map(null, $this->found
, $x->found
) as $v) {
4278 if (!$v[0]->equals($v[1])) return false;
4280 if (sizeof($this->missing
) !== sizeof($x->missing
)) return false;
4281 foreach (array_map(null, $this->missing
, $x->missing
) as $v) {
4282 if (!$v[0]->equals($v[1])) return false;
4284 if (sizeof($this->deferred
) !== sizeof($x->deferred
)) return false;
4285 foreach (array_map(null, $this->deferred
, $x->deferred
) as $v) {
4286 if (!$v[0]->equals($v[1])) return false;
4290 public function shortDebugString($prefix = "") {
4292 foreach ($this->found
as $value) {
4293 $res .= $prefix . "found <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4295 foreach ($this->missing
as $value) {
4296 $res .= $prefix . "missing <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4298 foreach ($this->deferred
as $value) {
4299 $res .= $prefix . "deferred <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4305 namespace google\appengine\datastore\v
4 {
4306 class RunQueryRequest
extends \google\net\ProtocolMessage
{
4307 public function getReadOptions() {
4308 if (!isset($this->read_options
)) {
4309 return new \google\appengine\datastore\v
4\
ReadOptions();
4311 return $this->read_options
;
4313 public function mutableReadOptions() {
4314 if (!isset($this->read_options
)) {
4315 $res = new \google\appengine\datastore\v
4\
ReadOptions();
4316 $this->read_options
= $res;
4319 return $this->read_options
;
4321 public function clearReadOptions() {
4322 if (isset($this->read_options
)) {
4323 unset($this->read_options
);
4326 public function hasReadOptions() {
4327 return isset($this->read_options
);
4329 public function getPartitionId() {
4330 if (!isset($this->partition_id
)) {
4331 return new \google\appengine\datastore\v
4\
PartitionId();
4333 return $this->partition_id
;
4335 public function mutablePartitionId() {
4336 if (!isset($this->partition_id
)) {
4337 $res = new \google\appengine\datastore\v
4\
PartitionId();
4338 $this->partition_id
= $res;
4341 return $this->partition_id
;
4343 public function clearPartitionId() {
4344 if (isset($this->partition_id
)) {
4345 unset($this->partition_id
);
4348 public function hasPartitionId() {
4349 return isset($this->partition_id
);
4351 public function getQuery() {
4352 if (!isset($this->query
)) {
4353 return new \google\appengine\datastore\v
4\
Query();
4355 return $this->query
;
4357 public function mutableQuery() {
4358 if (!isset($this->query
)) {
4359 $res = new \google\appengine\datastore\v
4\
Query();
4360 $this->query
= $res;
4363 return $this->query
;
4365 public function clearQuery() {
4366 if (isset($this->query
)) {
4367 unset($this->query
);
4370 public function hasQuery() {
4371 return isset($this->query
);
4373 public function getMinSafeTimeSeconds() {
4374 if (!isset($this->min_safe_time_seconds
)) {
4377 return $this->min_safe_time_seconds
;
4379 public function setMinSafeTimeSeconds($val) {
4380 if (is_double($val)) {
4381 $this->min_safe_time_seconds
= sprintf('%0.0F', $val);
4383 $this->min_safe_time_seconds
= $val;
4387 public function clearMinSafeTimeSeconds() {
4388 unset($this->min_safe_time_seconds
);
4391 public function hasMinSafeTimeSeconds() {
4392 return isset($this->min_safe_time_seconds
);
4394 public function getSuggestedBatchSize() {
4395 if (!isset($this->suggested_batch_size
)) {
4398 return $this->suggested_batch_size
;
4400 public function setSuggestedBatchSize($val) {
4401 $this->suggested_batch_size
= $val;
4404 public function clearSuggestedBatchSize() {
4405 unset($this->suggested_batch_size
);
4408 public function hasSuggestedBatchSize() {
4409 return isset($this->suggested_batch_size
);
4411 public function getGqlQuery() {
4412 if (!isset($this->gql_query
)) {
4413 return new \google\appengine\datastore\v
4\
GqlQuery();
4415 return $this->gql_query
;
4417 public function mutableGqlQuery() {
4418 if (!isset($this->gql_query
)) {
4419 $res = new \google\appengine\datastore\v
4\
GqlQuery();
4420 $this->gql_query
= $res;
4423 return $this->gql_query
;
4425 public function clearGqlQuery() {
4426 if (isset($this->gql_query
)) {
4427 unset($this->gql_query
);
4430 public function hasGqlQuery() {
4431 return isset($this->gql_query
);
4433 public function clear() {
4434 $this->clearReadOptions();
4435 $this->clearPartitionId();
4436 $this->clearQuery();
4437 $this->clearMinSafeTimeSeconds();
4438 $this->clearSuggestedBatchSize();
4439 $this->clearGqlQuery();
4441 public function byteSizePartial() {
4443 if (isset($this->read_options
)) {
4445 $res +
= $this->lengthString($this->read_options
->byteSizePartial());
4447 if (isset($this->partition_id
)) {
4449 $res +
= $this->lengthString($this->partition_id
->byteSizePartial());
4451 if (isset($this->query
)) {
4453 $res +
= $this->lengthString($this->query
->byteSizePartial());
4455 if (isset($this->min_safe_time_seconds
)) {
4457 $res +
= $this->lengthVarInt64($this->min_safe_time_seconds
);
4459 if (isset($this->suggested_batch_size
)) {
4461 $res +
= $this->lengthVarInt64($this->suggested_batch_size
);
4463 if (isset($this->gql_query
)) {
4465 $res +
= $this->lengthString($this->gql_query
->byteSizePartial());
4469 public function outputPartial($out) {
4470 if (isset($this->read_options
)) {
4471 $out->putVarInt32(10);
4472 $out->putVarInt32($this->read_options
->byteSizePartial());
4473 $this->read_options
->outputPartial($out);
4475 if (isset($this->partition_id
)) {
4476 $out->putVarInt32(18);
4477 $out->putVarInt32($this->partition_id
->byteSizePartial());
4478 $this->partition_id
->outputPartial($out);
4480 if (isset($this->query
)) {
4481 $out->putVarInt32(26);
4482 $out->putVarInt32($this->query
->byteSizePartial());
4483 $this->query
->outputPartial($out);
4485 if (isset($this->min_safe_time_seconds
)) {
4486 $out->putVarInt32(32);
4487 $out->putVarInt64($this->min_safe_time_seconds
);
4489 if (isset($this->suggested_batch_size
)) {
4490 $out->putVarInt32(40);
4491 $out->putVarInt32($this->suggested_batch_size
);
4493 if (isset($this->gql_query
)) {
4494 $out->putVarInt32(58);
4495 $out->putVarInt32($this->gql_query
->byteSizePartial());
4496 $this->gql_query
->outputPartial($out);
4499 public function tryMerge($d) {
4500 while($d->avail() > 0) {
4501 $tt = $d->getVarInt32();
4504 $length = $d->getVarInt32();
4505 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4507 $this->mutableReadOptions()->tryMerge($tmp);
4510 $length = $d->getVarInt32();
4511 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4513 $this->mutablePartitionId()->tryMerge($tmp);
4516 $length = $d->getVarInt32();
4517 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4519 $this->mutableQuery()->tryMerge($tmp);
4522 $this->setMinSafeTimeSeconds($d->getVarInt64());
4525 $this->setSuggestedBatchSize($d->getVarInt32());
4528 $length = $d->getVarInt32();
4529 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4531 $this->mutableGqlQuery()->tryMerge($tmp);
4534 throw new \google\net\
ProtocolBufferDecodeError();
4541 public function checkInitialized() {
4542 if (isset($this->read_options
) && (!$this->read_options
->isInitialized())) return 'read_options';
4543 if (isset($this->partition_id
) && (!$this->partition_id
->isInitialized())) return 'partition_id';
4544 if (isset($this->query
) && (!$this->query
->isInitialized())) return 'query';
4545 if (isset($this->gql_query
) && (!$this->gql_query
->isInitialized())) return 'gql_query';
4548 public function mergeFrom($x) {
4549 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4550 if ($x->hasReadOptions()) {
4551 $this->mutableReadOptions()->mergeFrom($x->getReadOptions());
4553 if ($x->hasPartitionId()) {
4554 $this->mutablePartitionId()->mergeFrom($x->getPartitionId());
4556 if ($x->hasQuery()) {
4557 $this->mutableQuery()->mergeFrom($x->getQuery());
4559 if ($x->hasMinSafeTimeSeconds()) {
4560 $this->setMinSafeTimeSeconds($x->getMinSafeTimeSeconds());
4562 if ($x->hasSuggestedBatchSize()) {
4563 $this->setSuggestedBatchSize($x->getSuggestedBatchSize());
4565 if ($x->hasGqlQuery()) {
4566 $this->mutableGqlQuery()->mergeFrom($x->getGqlQuery());
4569 public function equals($x) {
4570 if ($x === $this) { return true; }
4571 if (isset($this->read_options
) !== isset($x->read_options
)) return false;
4572 if (isset($this->read_options
) && !$this->read_options
->equals($x->read_options
)) return false;
4573 if (isset($this->partition_id
) !== isset($x->partition_id
)) return false;
4574 if (isset($this->partition_id
) && !$this->partition_id
->equals($x->partition_id
)) return false;
4575 if (isset($this->query
) !== isset($x->query
)) return false;
4576 if (isset($this->query
) && !$this->query
->equals($x->query
)) return false;
4577 if (isset($this->min_safe_time_seconds
) !== isset($x->min_safe_time_seconds
)) return false;
4578 if (isset($this->min_safe_time_seconds
) && !$this->integerEquals($this->min_safe_time_seconds
, $x->min_safe_time_seconds
)) return false;
4579 if (isset($this->suggested_batch_size
) !== isset($x->suggested_batch_size
)) return false;
4580 if (isset($this->suggested_batch_size
) && !$this->integerEquals($this->suggested_batch_size
, $x->suggested_batch_size
)) return false;
4581 if (isset($this->gql_query
) !== isset($x->gql_query
)) return false;
4582 if (isset($this->gql_query
) && !$this->gql_query
->equals($x->gql_query
)) return false;
4585 public function shortDebugString($prefix = "") {
4587 if (isset($this->read_options
)) {
4588 $res .= $prefix . "read_options <\n" . $this->read_options
->shortDebugString($prefix . " ") . $prefix . ">\n";
4590 if (isset($this->partition_id
)) {
4591 $res .= $prefix . "partition_id <\n" . $this->partition_id
->shortDebugString($prefix . " ") . $prefix . ">\n";
4593 if (isset($this->query
)) {
4594 $res .= $prefix . "query <\n" . $this->query
->shortDebugString($prefix . " ") . $prefix . ">\n";
4596 if (isset($this->min_safe_time_seconds
)) {
4597 $res .= $prefix . "min_safe_time_seconds: " . $this->debugFormatInt64($this->min_safe_time_seconds
) . "\n";
4599 if (isset($this->suggested_batch_size
)) {
4600 $res .= $prefix . "suggested_batch_size: " . $this->debugFormatInt32($this->suggested_batch_size
) . "\n";
4602 if (isset($this->gql_query
)) {
4603 $res .= $prefix . "gql_query <\n" . $this->gql_query
->shortDebugString($prefix . " ") . $prefix . ">\n";
4609 namespace google\appengine\datastore\v
4 {
4610 class RunQueryResponse
extends \google\net\ProtocolMessage
{
4611 public function getBatch() {
4612 if (!isset($this->batch
)) {
4613 return new \google\appengine\datastore\v
4\
QueryResultBatch();
4615 return $this->batch
;
4617 public function mutableBatch() {
4618 if (!isset($this->batch
)) {
4619 $res = new \google\appengine\datastore\v
4\
QueryResultBatch();
4620 $this->batch
= $res;
4623 return $this->batch
;
4625 public function clearBatch() {
4626 if (isset($this->batch
)) {
4627 unset($this->batch
);
4630 public function hasBatch() {
4631 return isset($this->batch
);
4633 public function getQueryHandle() {
4634 if (!isset($this->query_handle
)) {
4637 return $this->query_handle
;
4639 public function setQueryHandle($val) {
4640 $this->query_handle
= $val;
4643 public function clearQueryHandle() {
4644 unset($this->query_handle
);
4647 public function hasQueryHandle() {
4648 return isset($this->query_handle
);
4650 public function clear() {
4651 $this->clearBatch();
4652 $this->clearQueryHandle();
4654 public function byteSizePartial() {
4656 if (isset($this->batch
)) {
4658 $res +
= $this->lengthString($this->batch
->byteSizePartial());
4660 if (isset($this->query_handle
)) {
4662 $res +
= $this->lengthString(strlen($this->query_handle
));
4666 public function outputPartial($out) {
4667 if (isset($this->batch
)) {
4668 $out->putVarInt32(10);
4669 $out->putVarInt32($this->batch
->byteSizePartial());
4670 $this->batch
->outputPartial($out);
4672 if (isset($this->query_handle
)) {
4673 $out->putVarInt32(18);
4674 $out->putPrefixedString($this->query_handle
);
4677 public function tryMerge($d) {
4678 while($d->avail() > 0) {
4679 $tt = $d->getVarInt32();
4682 $length = $d->getVarInt32();
4683 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4685 $this->mutableBatch()->tryMerge($tmp);
4688 $length = $d->getVarInt32();
4689 $this->setQueryHandle(substr($d->buffer(), $d->pos(), $length));
4693 throw new \google\net\
ProtocolBufferDecodeError();
4700 public function checkInitialized() {
4701 if ((!isset($this->batch
)) ||
(!$this->batch
->isInitialized())) return 'batch';
4704 public function mergeFrom($x) {
4705 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4706 if ($x->hasBatch()) {
4707 $this->mutableBatch()->mergeFrom($x->getBatch());
4709 if ($x->hasQueryHandle()) {
4710 $this->setQueryHandle($x->getQueryHandle());
4713 public function equals($x) {
4714 if ($x === $this) { return true; }
4715 if (isset($this->batch
) !== isset($x->batch
)) return false;
4716 if (isset($this->batch
) && !$this->batch
->equals($x->batch
)) return false;
4717 if (isset($this->query_handle
) !== isset($x->query_handle
)) return false;
4718 if (isset($this->query_handle
) && $this->query_handle
!== $x->query_handle
) return false;
4721 public function shortDebugString($prefix = "") {
4723 if (isset($this->batch
)) {
4724 $res .= $prefix . "batch <\n" . $this->batch
->shortDebugString($prefix . " ") . $prefix . ">\n";
4726 if (isset($this->query_handle
)) {
4727 $res .= $prefix . "query_handle: " . $this->debugFormatString($this->query_handle
) . "\n";
4733 namespace google\appengine\datastore\v
4 {
4734 class ContinueQueryRequest
extends \google\net\ProtocolMessage
{
4735 public function getQueryHandle() {
4736 if (!isset($this->query_handle
)) {
4739 return $this->query_handle
;
4741 public function setQueryHandle($val) {
4742 $this->query_handle
= $val;
4745 public function clearQueryHandle() {
4746 unset($this->query_handle
);
4749 public function hasQueryHandle() {
4750 return isset($this->query_handle
);
4752 public function clear() {
4753 $this->clearQueryHandle();
4755 public function byteSizePartial() {
4757 if (isset($this->query_handle
)) {
4759 $res +
= $this->lengthString(strlen($this->query_handle
));
4763 public function outputPartial($out) {
4764 if (isset($this->query_handle
)) {
4765 $out->putVarInt32(10);
4766 $out->putPrefixedString($this->query_handle
);
4769 public function tryMerge($d) {
4770 while($d->avail() > 0) {
4771 $tt = $d->getVarInt32();
4774 $length = $d->getVarInt32();
4775 $this->setQueryHandle(substr($d->buffer(), $d->pos(), $length));
4779 throw new \google\net\
ProtocolBufferDecodeError();
4786 public function checkInitialized() {
4787 if (!isset($this->query_handle
)) return 'query_handle';
4790 public function mergeFrom($x) {
4791 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4792 if ($x->hasQueryHandle()) {
4793 $this->setQueryHandle($x->getQueryHandle());
4796 public function equals($x) {
4797 if ($x === $this) { return true; }
4798 if (isset($this->query_handle
) !== isset($x->query_handle
)) return false;
4799 if (isset($this->query_handle
) && $this->query_handle
!== $x->query_handle
) return false;
4802 public function shortDebugString($prefix = "") {
4804 if (isset($this->query_handle
)) {
4805 $res .= $prefix . "query_handle: " . $this->debugFormatString($this->query_handle
) . "\n";
4811 namespace google\appengine\datastore\v
4 {
4812 class ContinueQueryResponse
extends \google\net\ProtocolMessage
{
4813 public function getBatch() {
4814 if (!isset($this->batch
)) {
4815 return new \google\appengine\datastore\v
4\
QueryResultBatch();
4817 return $this->batch
;
4819 public function mutableBatch() {
4820 if (!isset($this->batch
)) {
4821 $res = new \google\appengine\datastore\v
4\
QueryResultBatch();
4822 $this->batch
= $res;
4825 return $this->batch
;
4827 public function clearBatch() {
4828 if (isset($this->batch
)) {
4829 unset($this->batch
);
4832 public function hasBatch() {
4833 return isset($this->batch
);
4835 public function clear() {
4836 $this->clearBatch();
4838 public function byteSizePartial() {
4840 if (isset($this->batch
)) {
4842 $res +
= $this->lengthString($this->batch
->byteSizePartial());
4846 public function outputPartial($out) {
4847 if (isset($this->batch
)) {
4848 $out->putVarInt32(10);
4849 $out->putVarInt32($this->batch
->byteSizePartial());
4850 $this->batch
->outputPartial($out);
4853 public function tryMerge($d) {
4854 while($d->avail() > 0) {
4855 $tt = $d->getVarInt32();
4858 $length = $d->getVarInt32();
4859 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
4861 $this->mutableBatch()->tryMerge($tmp);
4864 throw new \google\net\
ProtocolBufferDecodeError();
4871 public function checkInitialized() {
4872 if ((!isset($this->batch
)) ||
(!$this->batch
->isInitialized())) return 'batch';
4875 public function mergeFrom($x) {
4876 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4877 if ($x->hasBatch()) {
4878 $this->mutableBatch()->mergeFrom($x->getBatch());
4881 public function equals($x) {
4882 if ($x === $this) { return true; }
4883 if (isset($this->batch
) !== isset($x->batch
)) return false;
4884 if (isset($this->batch
) && !$this->batch
->equals($x->batch
)) return false;
4887 public function shortDebugString($prefix = "") {
4889 if (isset($this->batch
)) {
4890 $res .= $prefix . "batch <\n" . $this->batch
->shortDebugString($prefix . " ") . $prefix . ">\n";
4896 namespace google\appengine\datastore\v
4 {
4897 class BeginTransactionRequest
extends \google\net\ProtocolMessage
{
4898 public function getCrossGroup() {
4899 if (!isset($this->cross_group
)) {
4902 return $this->cross_group
;
4904 public function setCrossGroup($val) {
4905 $this->cross_group
= $val;
4908 public function clearCrossGroup() {
4909 unset($this->cross_group
);
4912 public function hasCrossGroup() {
4913 return isset($this->cross_group
);
4915 public function getCrossRequest() {
4916 if (!isset($this->cross_request
)) {
4919 return $this->cross_request
;
4921 public function setCrossRequest($val) {
4922 $this->cross_request
= $val;
4925 public function clearCrossRequest() {
4926 unset($this->cross_request
);
4929 public function hasCrossRequest() {
4930 return isset($this->cross_request
);
4932 public function clear() {
4933 $this->clearCrossGroup();
4934 $this->clearCrossRequest();
4936 public function byteSizePartial() {
4938 if (isset($this->cross_group
)) {
4941 if (isset($this->cross_request
)) {
4946 public function outputPartial($out) {
4947 if (isset($this->cross_group
)) {
4948 $out->putVarInt32(8);
4949 $out->putBoolean($this->cross_group
);
4951 if (isset($this->cross_request
)) {
4952 $out->putVarInt32(16);
4953 $out->putBoolean($this->cross_request
);
4956 public function tryMerge($d) {
4957 while($d->avail() > 0) {
4958 $tt = $d->getVarInt32();
4961 $this->setCrossGroup($d->getBoolean());
4964 $this->setCrossRequest($d->getBoolean());
4967 throw new \google\net\
ProtocolBufferDecodeError();
4974 public function checkInitialized() {
4977 public function mergeFrom($x) {
4978 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
4979 if ($x->hasCrossGroup()) {
4980 $this->setCrossGroup($x->getCrossGroup());
4982 if ($x->hasCrossRequest()) {
4983 $this->setCrossRequest($x->getCrossRequest());
4986 public function equals($x) {
4987 if ($x === $this) { return true; }
4988 if (isset($this->cross_group
) !== isset($x->cross_group
)) return false;
4989 if (isset($this->cross_group
) && $this->cross_group
!== $x->cross_group
) return false;
4990 if (isset($this->cross_request
) !== isset($x->cross_request
)) return false;
4991 if (isset($this->cross_request
) && $this->cross_request
!== $x->cross_request
) return false;
4994 public function shortDebugString($prefix = "") {
4996 if (isset($this->cross_group
)) {
4997 $res .= $prefix . "cross_group: " . $this->debugFormatBool($this->cross_group
) . "\n";
4999 if (isset($this->cross_request
)) {
5000 $res .= $prefix . "cross_request: " . $this->debugFormatBool($this->cross_request
) . "\n";
5006 namespace google\appengine\datastore\v
4 {
5007 class BeginTransactionResponse
extends \google\net\ProtocolMessage
{
5008 public function getTransaction() {
5009 if (!isset($this->transaction
)) {
5012 return $this->transaction
;
5014 public function setTransaction($val) {
5015 $this->transaction
= $val;
5018 public function clearTransaction() {
5019 unset($this->transaction
);
5022 public function hasTransaction() {
5023 return isset($this->transaction
);
5025 public function clear() {
5026 $this->clearTransaction();
5028 public function byteSizePartial() {
5030 if (isset($this->transaction
)) {
5032 $res +
= $this->lengthString(strlen($this->transaction
));
5036 public function outputPartial($out) {
5037 if (isset($this->transaction
)) {
5038 $out->putVarInt32(10);
5039 $out->putPrefixedString($this->transaction
);
5042 public function tryMerge($d) {
5043 while($d->avail() > 0) {
5044 $tt = $d->getVarInt32();
5047 $length = $d->getVarInt32();
5048 $this->setTransaction(substr($d->buffer(), $d->pos(), $length));
5052 throw new \google\net\
ProtocolBufferDecodeError();
5059 public function checkInitialized() {
5060 if (!isset($this->transaction
)) return 'transaction';
5063 public function mergeFrom($x) {
5064 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5065 if ($x->hasTransaction()) {
5066 $this->setTransaction($x->getTransaction());
5069 public function equals($x) {
5070 if ($x === $this) { return true; }
5071 if (isset($this->transaction
) !== isset($x->transaction
)) return false;
5072 if (isset($this->transaction
) && $this->transaction
!== $x->transaction
) return false;
5075 public function shortDebugString($prefix = "") {
5077 if (isset($this->transaction
)) {
5078 $res .= $prefix . "transaction: " . $this->debugFormatString($this->transaction
) . "\n";
5084 namespace google\appengine\datastore\v
4 {
5085 class RollbackRequest
extends \google\net\ProtocolMessage
{
5086 public function getTransaction() {
5087 if (!isset($this->transaction
)) {
5090 return $this->transaction
;
5092 public function setTransaction($val) {
5093 $this->transaction
= $val;
5096 public function clearTransaction() {
5097 unset($this->transaction
);
5100 public function hasTransaction() {
5101 return isset($this->transaction
);
5103 public function clear() {
5104 $this->clearTransaction();
5106 public function byteSizePartial() {
5108 if (isset($this->transaction
)) {
5110 $res +
= $this->lengthString(strlen($this->transaction
));
5114 public function outputPartial($out) {
5115 if (isset($this->transaction
)) {
5116 $out->putVarInt32(10);
5117 $out->putPrefixedString($this->transaction
);
5120 public function tryMerge($d) {
5121 while($d->avail() > 0) {
5122 $tt = $d->getVarInt32();
5125 $length = $d->getVarInt32();
5126 $this->setTransaction(substr($d->buffer(), $d->pos(), $length));
5130 throw new \google\net\
ProtocolBufferDecodeError();
5137 public function checkInitialized() {
5138 if (!isset($this->transaction
)) return 'transaction';
5141 public function mergeFrom($x) {
5142 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5143 if ($x->hasTransaction()) {
5144 $this->setTransaction($x->getTransaction());
5147 public function equals($x) {
5148 if ($x === $this) { return true; }
5149 if (isset($this->transaction
) !== isset($x->transaction
)) return false;
5150 if (isset($this->transaction
) && $this->transaction
!== $x->transaction
) return false;
5153 public function shortDebugString($prefix = "") {
5155 if (isset($this->transaction
)) {
5156 $res .= $prefix . "transaction: " . $this->debugFormatString($this->transaction
) . "\n";
5162 namespace google\appengine\datastore\v
4 {
5163 class RollbackResponse
extends \google\net\ProtocolMessage
{
5164 public function clear() {
5166 public function byteSizePartial() {
5170 public function outputPartial($out) {
5172 public function tryMerge($d) {
5173 while($d->avail() > 0) {
5174 $tt = $d->getVarInt32();
5177 throw new \google\net\
ProtocolBufferDecodeError();
5184 public function checkInitialized() {
5187 public function mergeFrom($x) {
5188 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5190 public function equals($x) {
5191 if ($x === $this) { return true; }
5194 public function shortDebugString($prefix = "") {
5200 namespace google\appengine\datastore\v
4\CommitRequest
{
5202 const TRANSACTIONAL
= 1;
5203 const NON_TRANSACTIONAL
= 2;
5206 namespace google\appengine\datastore\v
4 {
5207 class CommitRequest
extends \google\net\ProtocolMessage
{
5208 private $mutation = array();
5209 public function getTransaction() {
5210 if (!isset($this->transaction
)) {
5213 return $this->transaction
;
5215 public function setTransaction($val) {
5216 $this->transaction
= $val;
5219 public function clearTransaction() {
5220 unset($this->transaction
);
5223 public function hasTransaction() {
5224 return isset($this->transaction
);
5226 public function getDeprecatedMutation() {
5227 if (!isset($this->deprecated_mutation
)) {
5228 return new \google\appengine\datastore\v
4\
DeprecatedMutation();
5230 return $this->deprecated_mutation
;
5232 public function mutableDeprecatedMutation() {
5233 if (!isset($this->deprecated_mutation
)) {
5234 $res = new \google\appengine\datastore\v
4\
DeprecatedMutation();
5235 $this->deprecated_mutation
= $res;
5238 return $this->deprecated_mutation
;
5240 public function clearDeprecatedMutation() {
5241 if (isset($this->deprecated_mutation
)) {
5242 unset($this->deprecated_mutation
);
5245 public function hasDeprecatedMutation() {
5246 return isset($this->deprecated_mutation
);
5248 public function getMode() {
5249 if (!isset($this->mode
)) {
5254 public function setMode($val) {
5258 public function clearMode() {
5262 public function hasMode() {
5263 return isset($this->mode
);
5265 public function getMutationSize() {
5266 return sizeof($this->mutation
);
5268 public function getMutationList() {
5269 return $this->mutation
;
5271 public function mutableMutation($idx) {
5272 if (!isset($this->mutation
[$idx])) {
5273 $val = new \google\appengine\datastore\v
4\
Mutation();
5274 $this->mutation
[$idx] = $val;
5277 return $this->mutation
[$idx];
5279 public function getMutation($idx) {
5280 if (isset($this->mutation
[$idx])) {
5281 return $this->mutation
[$idx];
5283 if ($idx >= end(array_keys($this->mutation
))) {
5284 throw new \
OutOfRangeException('index out of range: ' +
$idx);
5286 return new \google\appengine\datastore\v
4\
Mutation();
5288 public function addMutation() {
5289 $val = new \google\appengine\datastore\v
4\
Mutation();
5290 $this->mutation
[] = $val;
5293 public function clearMutation() {
5294 $this->mutation
= array();
5296 public function getIgnoreReadOnly() {
5297 if (!isset($this->ignore_read_only
)) {
5300 return $this->ignore_read_only
;
5302 public function setIgnoreReadOnly($val) {
5303 $this->ignore_read_only
= $val;
5306 public function clearIgnoreReadOnly() {
5307 unset($this->ignore_read_only
);
5310 public function hasIgnoreReadOnly() {
5311 return isset($this->ignore_read_only
);
5313 public function clear() {
5314 $this->clearTransaction();
5315 $this->clearDeprecatedMutation();
5317 $this->clearMutation();
5318 $this->clearIgnoreReadOnly();
5320 public function byteSizePartial() {
5322 if (isset($this->transaction
)) {
5324 $res +
= $this->lengthString(strlen($this->transaction
));
5326 if (isset($this->deprecated_mutation
)) {
5328 $res +
= $this->lengthString($this->deprecated_mutation
->byteSizePartial());
5330 if (isset($this->mode
)) {
5332 $res +
= $this->lengthVarInt64($this->mode
);
5334 $this->checkProtoArray($this->mutation
);
5335 $res +
= 1 * sizeof($this->mutation
);
5336 foreach ($this->mutation
as $value) {
5337 $res +
= $this->lengthString($value->byteSizePartial());
5339 if (isset($this->ignore_read_only
)) {
5344 public function outputPartial($out) {
5345 if (isset($this->transaction
)) {
5346 $out->putVarInt32(10);
5347 $out->putPrefixedString($this->transaction
);
5349 if (isset($this->deprecated_mutation
)) {
5350 $out->putVarInt32(18);
5351 $out->putVarInt32($this->deprecated_mutation
->byteSizePartial());
5352 $this->deprecated_mutation
->outputPartial($out);
5354 if (isset($this->mode
)) {
5355 $out->putVarInt32(32);
5356 $out->putVarInt32($this->mode
);
5358 $this->checkProtoArray($this->mutation
);
5359 foreach ($this->mutation
as $value) {
5360 $out->putVarInt32(42);
5361 $out->putVarInt32($value->byteSizePartial());
5362 $value->outputPartial($out);
5364 if (isset($this->ignore_read_only
)) {
5365 $out->putVarInt32(48);
5366 $out->putBoolean($this->ignore_read_only
);
5369 public function tryMerge($d) {
5370 while($d->avail() > 0) {
5371 $tt = $d->getVarInt32();
5374 $length = $d->getVarInt32();
5375 $this->setTransaction(substr($d->buffer(), $d->pos(), $length));
5379 $length = $d->getVarInt32();
5380 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5382 $this->mutableDeprecatedMutation()->tryMerge($tmp);
5385 $this->setMode($d->getVarInt32());
5388 $length = $d->getVarInt32();
5389 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5391 $this->addMutation()->tryMerge($tmp);
5394 $this->setIgnoreReadOnly($d->getBoolean());
5397 throw new \google\net\
ProtocolBufferDecodeError();
5404 public function checkInitialized() {
5405 if (isset($this->deprecated_mutation
) && (!$this->deprecated_mutation
->isInitialized())) return 'deprecated_mutation';
5406 foreach ($this->mutation
as $value) {
5407 if (!$value->isInitialized()) return 'mutation';
5411 public function mergeFrom($x) {
5412 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5413 if ($x->hasTransaction()) {
5414 $this->setTransaction($x->getTransaction());
5416 if ($x->hasDeprecatedMutation()) {
5417 $this->mutableDeprecatedMutation()->mergeFrom($x->getDeprecatedMutation());
5419 if ($x->hasMode()) {
5420 $this->setMode($x->getMode());
5422 foreach ($x->getMutationList() as $v) {
5423 $this->addMutation()->copyFrom($v);
5425 if ($x->hasIgnoreReadOnly()) {
5426 $this->setIgnoreReadOnly($x->getIgnoreReadOnly());
5429 public function equals($x) {
5430 if ($x === $this) { return true; }
5431 if (isset($this->transaction
) !== isset($x->transaction
)) return false;
5432 if (isset($this->transaction
) && $this->transaction
!== $x->transaction
) return false;
5433 if (isset($this->deprecated_mutation
) !== isset($x->deprecated_mutation
)) return false;
5434 if (isset($this->deprecated_mutation
) && !$this->deprecated_mutation
->equals($x->deprecated_mutation
)) return false;
5435 if (isset($this->mode
) !== isset($x->mode
)) return false;
5436 if (isset($this->mode
) && $this->mode
!== $x->mode
) return false;
5437 if (sizeof($this->mutation
) !== sizeof($x->mutation
)) return false;
5438 foreach (array_map(null, $this->mutation
, $x->mutation
) as $v) {
5439 if (!$v[0]->equals($v[1])) return false;
5441 if (isset($this->ignore_read_only
) !== isset($x->ignore_read_only
)) return false;
5442 if (isset($this->ignore_read_only
) && $this->ignore_read_only
!== $x->ignore_read_only
) return false;
5445 public function shortDebugString($prefix = "") {
5447 if (isset($this->transaction
)) {
5448 $res .= $prefix . "transaction: " . $this->debugFormatString($this->transaction
) . "\n";
5450 if (isset($this->deprecated_mutation
)) {
5451 $res .= $prefix . "deprecated_mutation <\n" . $this->deprecated_mutation
->shortDebugString($prefix . " ") . $prefix . ">\n";
5453 if (isset($this->mode
)) {
5454 $res .= $prefix . "mode: " . ($this->mode
) . "\n";
5456 foreach ($this->mutation
as $value) {
5457 $res .= $prefix . "mutation <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
5459 if (isset($this->ignore_read_only
)) {
5460 $res .= $prefix . "ignore_read_only: " . $this->debugFormatBool($this->ignore_read_only
) . "\n";
5466 namespace google\appengine\datastore\v
4 {
5467 class CommitResponse
extends \google\net\ProtocolMessage
{
5468 private $mutation_result = array();
5469 public function getDeprecatedMutationResult() {
5470 if (!isset($this->deprecated_mutation_result
)) {
5471 return new \google\appengine\datastore\v
4\
DeprecatedMutationResult();
5473 return $this->deprecated_mutation_result
;
5475 public function mutableDeprecatedMutationResult() {
5476 if (!isset($this->deprecated_mutation_result
)) {
5477 $res = new \google\appengine\datastore\v
4\
DeprecatedMutationResult();
5478 $this->deprecated_mutation_result
= $res;
5481 return $this->deprecated_mutation_result
;
5483 public function clearDeprecatedMutationResult() {
5484 if (isset($this->deprecated_mutation_result
)) {
5485 unset($this->deprecated_mutation_result
);
5488 public function hasDeprecatedMutationResult() {
5489 return isset($this->deprecated_mutation_result
);
5491 public function getMutationResultSize() {
5492 return sizeof($this->mutation_result
);
5494 public function getMutationResultList() {
5495 return $this->mutation_result
;
5497 public function mutableMutationResult($idx) {
5498 if (!isset($this->mutation_result
[$idx])) {
5499 $val = new \google\appengine\datastore\v
4\
MutationResult();
5500 $this->mutation_result
[$idx] = $val;
5503 return $this->mutation_result
[$idx];
5505 public function getMutationResult($idx) {
5506 if (isset($this->mutation_result
[$idx])) {
5507 return $this->mutation_result
[$idx];
5509 if ($idx >= end(array_keys($this->mutation_result
))) {
5510 throw new \
OutOfRangeException('index out of range: ' +
$idx);
5512 return new \google\appengine\datastore\v
4\
MutationResult();
5514 public function addMutationResult() {
5515 $val = new \google\appengine\datastore\v
4\
MutationResult();
5516 $this->mutation_result
[] = $val;
5519 public function clearMutationResult() {
5520 $this->mutation_result
= array();
5522 public function getIndexUpdates() {
5523 if (!isset($this->index_updates
)) {
5526 return $this->index_updates
;
5528 public function setIndexUpdates($val) {
5529 $this->index_updates
= $val;
5532 public function clearIndexUpdates() {
5533 unset($this->index_updates
);
5536 public function hasIndexUpdates() {
5537 return isset($this->index_updates
);
5539 public function clear() {
5540 $this->clearDeprecatedMutationResult();
5541 $this->clearMutationResult();
5542 $this->clearIndexUpdates();
5544 public function byteSizePartial() {
5546 if (isset($this->deprecated_mutation_result
)) {
5548 $res +
= $this->lengthString($this->deprecated_mutation_result
->byteSizePartial());
5550 $this->checkProtoArray($this->mutation_result
);
5551 $res +
= 1 * sizeof($this->mutation_result
);
5552 foreach ($this->mutation_result
as $value) {
5553 $res +
= $this->lengthString($value->byteSizePartial());
5555 if (isset($this->index_updates
)) {
5557 $res +
= $this->lengthVarInt64($this->index_updates
);
5561 public function outputPartial($out) {
5562 if (isset($this->deprecated_mutation_result
)) {
5563 $out->putVarInt32(10);
5564 $out->putVarInt32($this->deprecated_mutation_result
->byteSizePartial());
5565 $this->deprecated_mutation_result
->outputPartial($out);
5567 $this->checkProtoArray($this->mutation_result
);
5568 foreach ($this->mutation_result
as $value) {
5569 $out->putVarInt32(26);
5570 $out->putVarInt32($value->byteSizePartial());
5571 $value->outputPartial($out);
5573 if (isset($this->index_updates
)) {
5574 $out->putVarInt32(32);
5575 $out->putVarInt32($this->index_updates
);
5578 public function tryMerge($d) {
5579 while($d->avail() > 0) {
5580 $tt = $d->getVarInt32();
5583 $length = $d->getVarInt32();
5584 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5586 $this->mutableDeprecatedMutationResult()->tryMerge($tmp);
5589 $length = $d->getVarInt32();
5590 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5592 $this->addMutationResult()->tryMerge($tmp);
5595 $this->setIndexUpdates($d->getVarInt32());
5598 throw new \google\net\
ProtocolBufferDecodeError();
5605 public function checkInitialized() {
5606 if (isset($this->deprecated_mutation_result
) && (!$this->deprecated_mutation_result
->isInitialized())) return 'deprecated_mutation_result';
5607 foreach ($this->mutation_result
as $value) {
5608 if (!$value->isInitialized()) return 'mutation_result';
5612 public function mergeFrom($x) {
5613 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5614 if ($x->hasDeprecatedMutationResult()) {
5615 $this->mutableDeprecatedMutationResult()->mergeFrom($x->getDeprecatedMutationResult());
5617 foreach ($x->getMutationResultList() as $v) {
5618 $this->addMutationResult()->copyFrom($v);
5620 if ($x->hasIndexUpdates()) {
5621 $this->setIndexUpdates($x->getIndexUpdates());
5624 public function equals($x) {
5625 if ($x === $this) { return true; }
5626 if (isset($this->deprecated_mutation_result
) !== isset($x->deprecated_mutation_result
)) return false;
5627 if (isset($this->deprecated_mutation_result
) && !$this->deprecated_mutation_result
->equals($x->deprecated_mutation_result
)) return false;
5628 if (sizeof($this->mutation_result
) !== sizeof($x->mutation_result
)) return false;
5629 foreach (array_map(null, $this->mutation_result
, $x->mutation_result
) as $v) {
5630 if (!$v[0]->equals($v[1])) return false;
5632 if (isset($this->index_updates
) !== isset($x->index_updates
)) return false;
5633 if (isset($this->index_updates
) && !$this->integerEquals($this->index_updates
, $x->index_updates
)) return false;
5636 public function shortDebugString($prefix = "") {
5638 if (isset($this->deprecated_mutation_result
)) {
5639 $res .= $prefix . "deprecated_mutation_result <\n" . $this->deprecated_mutation_result
->shortDebugString($prefix . " ") . $prefix . ">\n";
5641 foreach ($this->mutation_result
as $value) {
5642 $res .= $prefix . "mutation_result <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
5644 if (isset($this->index_updates
)) {
5645 $res .= $prefix . "index_updates: " . $this->debugFormatInt32($this->index_updates
) . "\n";
5651 namespace google\appengine\datastore\v
4 {
5652 class AllocateIdsRequest
extends \google\net\ProtocolMessage
{
5653 private $allocate = array();
5654 private $reserve = array();
5655 public function getAllocateSize() {
5656 return sizeof($this->allocate
);
5658 public function getAllocateList() {
5659 return $this->allocate
;
5661 public function mutableAllocate($idx) {
5662 if (!isset($this->allocate
[$idx])) {
5663 $val = new \google\appengine\datastore\v
4\
Key();
5664 $this->allocate
[$idx] = $val;
5667 return $this->allocate
[$idx];
5669 public function getAllocate($idx) {
5670 if (isset($this->allocate
[$idx])) {
5671 return $this->allocate
[$idx];
5673 if ($idx >= end(array_keys($this->allocate
))) {
5674 throw new \
OutOfRangeException('index out of range: ' +
$idx);
5676 return new \google\appengine\datastore\v
4\
Key();
5678 public function addAllocate() {
5679 $val = new \google\appengine\datastore\v
4\
Key();
5680 $this->allocate
[] = $val;
5683 public function clearAllocate() {
5684 $this->allocate
= array();
5686 public function getReserveSize() {
5687 return sizeof($this->reserve
);
5689 public function getReserveList() {
5690 return $this->reserve
;
5692 public function mutableReserve($idx) {
5693 if (!isset($this->reserve
[$idx])) {
5694 $val = new \google\appengine\datastore\v
4\
Key();
5695 $this->reserve
[$idx] = $val;
5698 return $this->reserve
[$idx];
5700 public function getReserve($idx) {
5701 if (isset($this->reserve
[$idx])) {
5702 return $this->reserve
[$idx];
5704 if ($idx >= end(array_keys($this->reserve
))) {
5705 throw new \
OutOfRangeException('index out of range: ' +
$idx);
5707 return new \google\appengine\datastore\v
4\
Key();
5709 public function addReserve() {
5710 $val = new \google\appengine\datastore\v
4\
Key();
5711 $this->reserve
[] = $val;
5714 public function clearReserve() {
5715 $this->reserve
= array();
5717 public function clear() {
5718 $this->clearAllocate();
5719 $this->clearReserve();
5721 public function byteSizePartial() {
5723 $this->checkProtoArray($this->allocate
);
5724 $res +
= 1 * sizeof($this->allocate
);
5725 foreach ($this->allocate
as $value) {
5726 $res +
= $this->lengthString($value->byteSizePartial());
5728 $this->checkProtoArray($this->reserve
);
5729 $res +
= 1 * sizeof($this->reserve
);
5730 foreach ($this->reserve
as $value) {
5731 $res +
= $this->lengthString($value->byteSizePartial());
5735 public function outputPartial($out) {
5736 $this->checkProtoArray($this->allocate
);
5737 foreach ($this->allocate
as $value) {
5738 $out->putVarInt32(10);
5739 $out->putVarInt32($value->byteSizePartial());
5740 $value->outputPartial($out);
5742 $this->checkProtoArray($this->reserve
);
5743 foreach ($this->reserve
as $value) {
5744 $out->putVarInt32(18);
5745 $out->putVarInt32($value->byteSizePartial());
5746 $value->outputPartial($out);
5749 public function tryMerge($d) {
5750 while($d->avail() > 0) {
5751 $tt = $d->getVarInt32();
5754 $length = $d->getVarInt32();
5755 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5757 $this->addAllocate()->tryMerge($tmp);
5760 $length = $d->getVarInt32();
5761 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5763 $this->addReserve()->tryMerge($tmp);
5766 throw new \google\net\
ProtocolBufferDecodeError();
5773 public function checkInitialized() {
5774 foreach ($this->allocate
as $value) {
5775 if (!$value->isInitialized()) return 'allocate';
5777 foreach ($this->reserve
as $value) {
5778 if (!$value->isInitialized()) return 'reserve';
5782 public function mergeFrom($x) {
5783 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5784 foreach ($x->getAllocateList() as $v) {
5785 $this->addAllocate()->copyFrom($v);
5787 foreach ($x->getReserveList() as $v) {
5788 $this->addReserve()->copyFrom($v);
5791 public function equals($x) {
5792 if ($x === $this) { return true; }
5793 if (sizeof($this->allocate
) !== sizeof($x->allocate
)) return false;
5794 foreach (array_map(null, $this->allocate
, $x->allocate
) as $v) {
5795 if (!$v[0]->equals($v[1])) return false;
5797 if (sizeof($this->reserve
) !== sizeof($x->reserve
)) return false;
5798 foreach (array_map(null, $this->reserve
, $x->reserve
) as $v) {
5799 if (!$v[0]->equals($v[1])) return false;
5803 public function shortDebugString($prefix = "") {
5805 foreach ($this->allocate
as $value) {
5806 $res .= $prefix . "allocate <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
5808 foreach ($this->reserve
as $value) {
5809 $res .= $prefix . "reserve <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
5815 namespace google\appengine\datastore\v
4 {
5816 class AllocateIdsResponse
extends \google\net\ProtocolMessage
{
5817 private $allocated = array();
5818 public function getAllocatedSize() {
5819 return sizeof($this->allocated
);
5821 public function getAllocatedList() {
5822 return $this->allocated
;
5824 public function mutableAllocated($idx) {
5825 if (!isset($this->allocated
[$idx])) {
5826 $val = new \google\appengine\datastore\v
4\
Key();
5827 $this->allocated
[$idx] = $val;
5830 return $this->allocated
[$idx];
5832 public function getAllocated($idx) {
5833 if (isset($this->allocated
[$idx])) {
5834 return $this->allocated
[$idx];
5836 if ($idx >= end(array_keys($this->allocated
))) {
5837 throw new \
OutOfRangeException('index out of range: ' +
$idx);
5839 return new \google\appengine\datastore\v
4\
Key();
5841 public function addAllocated() {
5842 $val = new \google\appengine\datastore\v
4\
Key();
5843 $this->allocated
[] = $val;
5846 public function clearAllocated() {
5847 $this->allocated
= array();
5849 public function clear() {
5850 $this->clearAllocated();
5852 public function byteSizePartial() {
5854 $this->checkProtoArray($this->allocated
);
5855 $res +
= 1 * sizeof($this->allocated
);
5856 foreach ($this->allocated
as $value) {
5857 $res +
= $this->lengthString($value->byteSizePartial());
5861 public function outputPartial($out) {
5862 $this->checkProtoArray($this->allocated
);
5863 foreach ($this->allocated
as $value) {
5864 $out->putVarInt32(10);
5865 $out->putVarInt32($value->byteSizePartial());
5866 $value->outputPartial($out);
5869 public function tryMerge($d) {
5870 while($d->avail() > 0) {
5871 $tt = $d->getVarInt32();
5874 $length = $d->getVarInt32();
5875 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5877 $this->addAllocated()->tryMerge($tmp);
5880 throw new \google\net\
ProtocolBufferDecodeError();
5887 public function checkInitialized() {
5888 foreach ($this->allocated
as $value) {
5889 if (!$value->isInitialized()) return 'allocated';
5893 public function mergeFrom($x) {
5894 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5895 foreach ($x->getAllocatedList() as $v) {
5896 $this->addAllocated()->copyFrom($v);
5899 public function equals($x) {
5900 if ($x === $this) { return true; }
5901 if (sizeof($this->allocated
) !== sizeof($x->allocated
)) return false;
5902 foreach (array_map(null, $this->allocated
, $x->allocated
) as $v) {
5903 if (!$v[0]->equals($v[1])) return false;
5907 public function shortDebugString($prefix = "") {
5909 foreach ($this->allocated
as $value) {
5910 $res .= $prefix . "allocated <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
5916 namespace google\appengine\datastore\v
4 {
5917 class WriteRequest
extends \google\net\ProtocolMessage
{
5918 public function getDeprecatedMutation() {
5919 if (!isset($this->deprecated_mutation
)) {
5920 return new \google\appengine\datastore\v
4\
DeprecatedMutation();
5922 return $this->deprecated_mutation
;
5924 public function mutableDeprecatedMutation() {
5925 if (!isset($this->deprecated_mutation
)) {
5926 $res = new \google\appengine\datastore\v
4\
DeprecatedMutation();
5927 $this->deprecated_mutation
= $res;
5930 return $this->deprecated_mutation
;
5932 public function clearDeprecatedMutation() {
5933 if (isset($this->deprecated_mutation
)) {
5934 unset($this->deprecated_mutation
);
5937 public function hasDeprecatedMutation() {
5938 return isset($this->deprecated_mutation
);
5940 public function clear() {
5941 $this->clearDeprecatedMutation();
5943 public function byteSizePartial() {
5945 if (isset($this->deprecated_mutation
)) {
5947 $res +
= $this->lengthString($this->deprecated_mutation
->byteSizePartial());
5951 public function outputPartial($out) {
5952 if (isset($this->deprecated_mutation
)) {
5953 $out->putVarInt32(10);
5954 $out->putVarInt32($this->deprecated_mutation
->byteSizePartial());
5955 $this->deprecated_mutation
->outputPartial($out);
5958 public function tryMerge($d) {
5959 while($d->avail() > 0) {
5960 $tt = $d->getVarInt32();
5963 $length = $d->getVarInt32();
5964 $tmp = new \google\net\
Decoder($d->buffer(), $d->pos(), $d->pos() +
$length);
5966 $this->mutableDeprecatedMutation()->tryMerge($tmp);
5969 throw new \google\net\
ProtocolBufferDecodeError();
5976 public function checkInitialized() {
5977 if ((!isset($this->deprecated_mutation
)) ||
(!$this->deprecated_mutation
->isInitialized())) return 'deprecated_mutation';
5980 public function mergeFrom($x) {
5981 if ($x === $this) { throw new \
IllegalArgumentException('Cannot copy message to itself'); }
5982 if ($x->hasDeprecatedMutation()) {
5983 $this->mutableDeprecatedMutation()->mergeFrom($x->getDeprecatedMutation());
5986 public function equals($x) {
5987 if ($x === $this) { return true; }
5988 if (isset($this->deprecated_mutation
) !== isset($x->deprecated_mutation
)) return false;
5989 if (isset($this->deprecated_mutation
) && !$this->deprecated_mutation
->equals($x->deprecated_mutation
)) return false;
5992 public function shortDebugString($prefix = "") {
5994 if (isset($this->deprecated_mutation
)) {
5995 $res .= $prefix . "deprecated_mutation <\n" . $this->deprecated_mutation
->shortDebugString($prefix . " ") . $prefix . ">\n";