App Engine Python SDK version 1.9.12
[gae.git] / python / php / sdk / google / appengine / datastore / entity_pb.php
blob2d166453340ab247034b9bb1348fa7df2f8d18c8
1 <?php
2 /**
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/entity.proto
20 namespace dummy {
21 require_once 'google/appengine/runtime/proto/ProtocolMessage.php';
23 namespace storage_onestore_v3\PropertyValue {
24 class PointValue extends \google\net\ProtocolMessage {
25 public function getX() {
26 if (!isset($this->x)) {
27 return 0.0;
29 return $this->x;
31 public function setX($val) {
32 $this->x = $val;
33 return $this;
35 public function clearX() {
36 unset($this->x);
37 return $this;
39 public function hasX() {
40 return isset($this->x);
42 public function getY() {
43 if (!isset($this->y)) {
44 return 0.0;
46 return $this->y;
48 public function setY($val) {
49 $this->y = $val;
50 return $this;
52 public function clearY() {
53 unset($this->y);
54 return $this;
56 public function hasY() {
57 return isset($this->y);
59 public function clear() {
60 $this->clearX();
61 $this->clearY();
63 public function byteSizePartial() {
64 $res = 0;
65 if (isset($this->x)) {
66 $res += 9;
68 if (isset($this->y)) {
69 $res += 9;
71 return $res;
73 public function outputPartial($out) {
74 if (isset($this->x)) {
75 $out->putVarInt32(49);
76 $out->putDouble($this->x);
78 if (isset($this->y)) {
79 $out->putVarInt32(57);
80 $out->putDouble($this->y);
83 public function tryMerge($d) {
84 while($d->avail() > 0) {
85 $tt = $d->getVarInt32();
86 switch ($tt) {
87 case 44: return;
88 case 49:
89 $this->setX($d->getDouble());
90 break;
91 case 57:
92 $this->setY($d->getDouble());
93 break;
94 case 0:
95 throw new \google\net\ProtocolBufferDecodeError();
96 break;
97 default:
98 $d->skipData($tt);
102 public function checkInitialized() {
103 if (!isset($this->x)) return 'x';
104 if (!isset($this->y)) return 'y';
105 return null;
107 public function mergeFrom($x) {
108 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
109 if ($x->hasX()) {
110 $this->setX($x->getX());
112 if ($x->hasY()) {
113 $this->setY($x->getY());
116 public function equals($x) {
117 if ($x === $this) { return true; }
118 if (isset($this->x) !== isset($x->x)) return false;
119 if (isset($this->x) && $this->x !== $x->x) return false;
120 if (isset($this->y) !== isset($x->y)) return false;
121 if (isset($this->y) && $this->y !== $x->y) return false;
122 return true;
124 public function shortDebugString($prefix = "") {
125 $res = '';
126 if (isset($this->x)) {
127 $res .= $prefix . "x: " . $this->debugFormatDouble($this->x) . "\n";
129 if (isset($this->y)) {
130 $res .= $prefix . "y: " . $this->debugFormatDouble($this->y) . "\n";
132 return $res;
136 namespace storage_onestore_v3\PropertyValue {
137 class UserValue extends \google\net\ProtocolMessage {
138 public function getEmail() {
139 if (!isset($this->email)) {
140 return '';
142 return $this->email;
144 public function setEmail($val) {
145 $this->email = $val;
146 return $this;
148 public function clearEmail() {
149 unset($this->email);
150 return $this;
152 public function hasEmail() {
153 return isset($this->email);
155 public function getAuthDomain() {
156 if (!isset($this->auth_domain)) {
157 return '';
159 return $this->auth_domain;
161 public function setAuthDomain($val) {
162 $this->auth_domain = $val;
163 return $this;
165 public function clearAuthDomain() {
166 unset($this->auth_domain);
167 return $this;
169 public function hasAuthDomain() {
170 return isset($this->auth_domain);
172 public function getNickname() {
173 if (!isset($this->nickname)) {
174 return '';
176 return $this->nickname;
178 public function setNickname($val) {
179 $this->nickname = $val;
180 return $this;
182 public function clearNickname() {
183 unset($this->nickname);
184 return $this;
186 public function hasNickname() {
187 return isset($this->nickname);
189 public function getGaiaid() {
190 if (!isset($this->gaiaid)) {
191 return "0";
193 return $this->gaiaid;
195 public function setGaiaid($val) {
196 if (is_double($val)) {
197 $this->gaiaid = sprintf('%0.0F', $val);
198 } else {
199 $this->gaiaid = $val;
201 return $this;
203 public function clearGaiaid() {
204 unset($this->gaiaid);
205 return $this;
207 public function hasGaiaid() {
208 return isset($this->gaiaid);
210 public function getObfuscatedGaiaid() {
211 if (!isset($this->obfuscated_gaiaid)) {
212 return '';
214 return $this->obfuscated_gaiaid;
216 public function setObfuscatedGaiaid($val) {
217 $this->obfuscated_gaiaid = $val;
218 return $this;
220 public function clearObfuscatedGaiaid() {
221 unset($this->obfuscated_gaiaid);
222 return $this;
224 public function hasObfuscatedGaiaid() {
225 return isset($this->obfuscated_gaiaid);
227 public function getFederatedIdentity() {
228 if (!isset($this->federated_identity)) {
229 return '';
231 return $this->federated_identity;
233 public function setFederatedIdentity($val) {
234 $this->federated_identity = $val;
235 return $this;
237 public function clearFederatedIdentity() {
238 unset($this->federated_identity);
239 return $this;
241 public function hasFederatedIdentity() {
242 return isset($this->federated_identity);
244 public function getFederatedProvider() {
245 if (!isset($this->federated_provider)) {
246 return '';
248 return $this->federated_provider;
250 public function setFederatedProvider($val) {
251 $this->federated_provider = $val;
252 return $this;
254 public function clearFederatedProvider() {
255 unset($this->federated_provider);
256 return $this;
258 public function hasFederatedProvider() {
259 return isset($this->federated_provider);
261 public function clear() {
262 $this->clearEmail();
263 $this->clearAuthDomain();
264 $this->clearNickname();
265 $this->clearGaiaid();
266 $this->clearObfuscatedGaiaid();
267 $this->clearFederatedIdentity();
268 $this->clearFederatedProvider();
270 public function byteSizePartial() {
271 $res = 0;
272 if (isset($this->email)) {
273 $res += 1;
274 $res += $this->lengthString(strlen($this->email));
276 if (isset($this->auth_domain)) {
277 $res += 1;
278 $res += $this->lengthString(strlen($this->auth_domain));
280 if (isset($this->nickname)) {
281 $res += 1;
282 $res += $this->lengthString(strlen($this->nickname));
284 if (isset($this->gaiaid)) {
285 $res += 2;
286 $res += $this->lengthVarInt64($this->gaiaid);
288 if (isset($this->obfuscated_gaiaid)) {
289 $res += 2;
290 $res += $this->lengthString(strlen($this->obfuscated_gaiaid));
292 if (isset($this->federated_identity)) {
293 $res += 2;
294 $res += $this->lengthString(strlen($this->federated_identity));
296 if (isset($this->federated_provider)) {
297 $res += 2;
298 $res += $this->lengthString(strlen($this->federated_provider));
300 return $res;
302 public function outputPartial($out) {
303 if (isset($this->email)) {
304 $out->putVarInt32(74);
305 $out->putPrefixedString($this->email);
307 if (isset($this->auth_domain)) {
308 $out->putVarInt32(82);
309 $out->putPrefixedString($this->auth_domain);
311 if (isset($this->nickname)) {
312 $out->putVarInt32(90);
313 $out->putPrefixedString($this->nickname);
315 if (isset($this->gaiaid)) {
316 $out->putVarInt32(144);
317 $out->putVarInt64($this->gaiaid);
319 if (isset($this->obfuscated_gaiaid)) {
320 $out->putVarInt32(154);
321 $out->putPrefixedString($this->obfuscated_gaiaid);
323 if (isset($this->federated_identity)) {
324 $out->putVarInt32(170);
325 $out->putPrefixedString($this->federated_identity);
327 if (isset($this->federated_provider)) {
328 $out->putVarInt32(178);
329 $out->putPrefixedString($this->federated_provider);
332 public function tryMerge($d) {
333 while($d->avail() > 0) {
334 $tt = $d->getVarInt32();
335 switch ($tt) {
336 case 68: return;
337 case 74:
338 $length = $d->getVarInt32();
339 $this->setEmail(substr($d->buffer(), $d->pos(), $length));
340 $d->skip($length);
341 break;
342 case 82:
343 $length = $d->getVarInt32();
344 $this->setAuthDomain(substr($d->buffer(), $d->pos(), $length));
345 $d->skip($length);
346 break;
347 case 90:
348 $length = $d->getVarInt32();
349 $this->setNickname(substr($d->buffer(), $d->pos(), $length));
350 $d->skip($length);
351 break;
352 case 144:
353 $this->setGaiaid($d->getVarInt64());
354 break;
355 case 154:
356 $length = $d->getVarInt32();
357 $this->setObfuscatedGaiaid(substr($d->buffer(), $d->pos(), $length));
358 $d->skip($length);
359 break;
360 case 170:
361 $length = $d->getVarInt32();
362 $this->setFederatedIdentity(substr($d->buffer(), $d->pos(), $length));
363 $d->skip($length);
364 break;
365 case 178:
366 $length = $d->getVarInt32();
367 $this->setFederatedProvider(substr($d->buffer(), $d->pos(), $length));
368 $d->skip($length);
369 break;
370 case 0:
371 throw new \google\net\ProtocolBufferDecodeError();
372 break;
373 default:
374 $d->skipData($tt);
378 public function checkInitialized() {
379 if (!isset($this->email)) return 'email';
380 if (!isset($this->auth_domain)) return 'auth_domain';
381 if (!isset($this->gaiaid)) return 'gaiaid';
382 return null;
384 public function mergeFrom($x) {
385 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
386 if ($x->hasEmail()) {
387 $this->setEmail($x->getEmail());
389 if ($x->hasAuthDomain()) {
390 $this->setAuthDomain($x->getAuthDomain());
392 if ($x->hasNickname()) {
393 $this->setNickname($x->getNickname());
395 if ($x->hasGaiaid()) {
396 $this->setGaiaid($x->getGaiaid());
398 if ($x->hasObfuscatedGaiaid()) {
399 $this->setObfuscatedGaiaid($x->getObfuscatedGaiaid());
401 if ($x->hasFederatedIdentity()) {
402 $this->setFederatedIdentity($x->getFederatedIdentity());
404 if ($x->hasFederatedProvider()) {
405 $this->setFederatedProvider($x->getFederatedProvider());
408 public function equals($x) {
409 if ($x === $this) { return true; }
410 if (isset($this->email) !== isset($x->email)) return false;
411 if (isset($this->email) && $this->email !== $x->email) return false;
412 if (isset($this->auth_domain) !== isset($x->auth_domain)) return false;
413 if (isset($this->auth_domain) && $this->auth_domain !== $x->auth_domain) return false;
414 if (isset($this->nickname) !== isset($x->nickname)) return false;
415 if (isset($this->nickname) && $this->nickname !== $x->nickname) return false;
416 if (isset($this->gaiaid) !== isset($x->gaiaid)) return false;
417 if (isset($this->gaiaid) && !$this->integerEquals($this->gaiaid, $x->gaiaid)) return false;
418 if (isset($this->obfuscated_gaiaid) !== isset($x->obfuscated_gaiaid)) return false;
419 if (isset($this->obfuscated_gaiaid) && $this->obfuscated_gaiaid !== $x->obfuscated_gaiaid) return false;
420 if (isset($this->federated_identity) !== isset($x->federated_identity)) return false;
421 if (isset($this->federated_identity) && $this->federated_identity !== $x->federated_identity) return false;
422 if (isset($this->federated_provider) !== isset($x->federated_provider)) return false;
423 if (isset($this->federated_provider) && $this->federated_provider !== $x->federated_provider) return false;
424 return true;
426 public function shortDebugString($prefix = "") {
427 $res = '';
428 if (isset($this->email)) {
429 $res .= $prefix . "email: " . $this->debugFormatString($this->email) . "\n";
431 if (isset($this->auth_domain)) {
432 $res .= $prefix . "auth_domain: " . $this->debugFormatString($this->auth_domain) . "\n";
434 if (isset($this->nickname)) {
435 $res .= $prefix . "nickname: " . $this->debugFormatString($this->nickname) . "\n";
437 if (isset($this->gaiaid)) {
438 $res .= $prefix . "gaiaid: " . $this->debugFormatInt64($this->gaiaid) . "\n";
440 if (isset($this->obfuscated_gaiaid)) {
441 $res .= $prefix . "obfuscated_gaiaid: " . $this->debugFormatString($this->obfuscated_gaiaid) . "\n";
443 if (isset($this->federated_identity)) {
444 $res .= $prefix . "federated_identity: " . $this->debugFormatString($this->federated_identity) . "\n";
446 if (isset($this->federated_provider)) {
447 $res .= $prefix . "federated_provider: " . $this->debugFormatString($this->federated_provider) . "\n";
449 return $res;
453 namespace storage_onestore_v3\PropertyValue\ReferenceValue {
454 class PathElement extends \google\net\ProtocolMessage {
455 public function getType() {
456 if (!isset($this->type)) {
457 return '';
459 return $this->type;
461 public function setType($val) {
462 $this->type = $val;
463 return $this;
465 public function clearType() {
466 unset($this->type);
467 return $this;
469 public function hasType() {
470 return isset($this->type);
472 public function getId() {
473 if (!isset($this->id)) {
474 return "0";
476 return $this->id;
478 public function setId($val) {
479 if (is_double($val)) {
480 $this->id = sprintf('%0.0F', $val);
481 } else {
482 $this->id = $val;
484 return $this;
486 public function clearId() {
487 unset($this->id);
488 return $this;
490 public function hasId() {
491 return isset($this->id);
493 public function getName() {
494 if (!isset($this->name)) {
495 return '';
497 return $this->name;
499 public function setName($val) {
500 $this->name = $val;
501 return $this;
503 public function clearName() {
504 unset($this->name);
505 return $this;
507 public function hasName() {
508 return isset($this->name);
510 public function clear() {
511 $this->clearType();
512 $this->clearId();
513 $this->clearName();
515 public function byteSizePartial() {
516 $res = 0;
517 if (isset($this->type)) {
518 $res += 1;
519 $res += $this->lengthString(strlen($this->type));
521 if (isset($this->id)) {
522 $res += 2;
523 $res += $this->lengthVarInt64($this->id);
525 if (isset($this->name)) {
526 $res += 2;
527 $res += $this->lengthString(strlen($this->name));
529 return $res;
531 public function outputPartial($out) {
532 if (isset($this->type)) {
533 $out->putVarInt32(122);
534 $out->putPrefixedString($this->type);
536 if (isset($this->id)) {
537 $out->putVarInt32(128);
538 $out->putVarInt64($this->id);
540 if (isset($this->name)) {
541 $out->putVarInt32(138);
542 $out->putPrefixedString($this->name);
545 public function tryMerge($d) {
546 while($d->avail() > 0) {
547 $tt = $d->getVarInt32();
548 switch ($tt) {
549 case 116: return;
550 case 122:
551 $length = $d->getVarInt32();
552 $this->setType(substr($d->buffer(), $d->pos(), $length));
553 $d->skip($length);
554 break;
555 case 128:
556 $this->setId($d->getVarInt64());
557 break;
558 case 138:
559 $length = $d->getVarInt32();
560 $this->setName(substr($d->buffer(), $d->pos(), $length));
561 $d->skip($length);
562 break;
563 case 0:
564 throw new \google\net\ProtocolBufferDecodeError();
565 break;
566 default:
567 $d->skipData($tt);
571 public function checkInitialized() {
572 if (!isset($this->type)) return 'type';
573 return null;
575 public function mergeFrom($x) {
576 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
577 if ($x->hasType()) {
578 $this->setType($x->getType());
580 if ($x->hasId()) {
581 $this->setId($x->getId());
583 if ($x->hasName()) {
584 $this->setName($x->getName());
587 public function equals($x) {
588 if ($x === $this) { return true; }
589 if (isset($this->type) !== isset($x->type)) return false;
590 if (isset($this->type) && $this->type !== $x->type) return false;
591 if (isset($this->id) !== isset($x->id)) return false;
592 if (isset($this->id) && !$this->integerEquals($this->id, $x->id)) return false;
593 if (isset($this->name) !== isset($x->name)) return false;
594 if (isset($this->name) && $this->name !== $x->name) return false;
595 return true;
597 public function shortDebugString($prefix = "") {
598 $res = '';
599 if (isset($this->type)) {
600 $res .= $prefix . "type: " . $this->debugFormatString($this->type) . "\n";
602 if (isset($this->id)) {
603 $res .= $prefix . "id: " . $this->debugFormatInt64($this->id) . "\n";
605 if (isset($this->name)) {
606 $res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
608 return $res;
612 namespace storage_onestore_v3\PropertyValue {
613 class ReferenceValue extends \google\net\ProtocolMessage {
614 private $pathelement = array();
615 public function getApp() {
616 if (!isset($this->app)) {
617 return '';
619 return $this->app;
621 public function setApp($val) {
622 $this->app = $val;
623 return $this;
625 public function clearApp() {
626 unset($this->app);
627 return $this;
629 public function hasApp() {
630 return isset($this->app);
632 public function getPathElementSize() {
633 return sizeof($this->pathelement);
635 public function getPathElementList() {
636 return $this->pathelement;
638 public function mutablePathElement($idx) {
639 if (!isset($this->pathelement[$idx])) {
640 $val = new \storage_onestore_v3\PropertyValue\ReferenceValue\PathElement();
641 $this->pathelement[$idx] = $val;
642 return $val;
644 return $this->pathelement[$idx];
646 public function getPathElement($idx) {
647 if (isset($this->pathelement[$idx])) {
648 return $this->pathelement[$idx];
650 if ($idx >= end(array_keys($this->pathelement))) {
651 throw new \OutOfRangeException('index out of range: ' + $idx);
653 return new \storage_onestore_v3\PropertyValue\ReferenceValue\PathElement();
655 public function addPathElement() {
656 $val = new \storage_onestore_v3\PropertyValue\ReferenceValue\PathElement();
657 $this->pathelement[] = $val;
658 return $val;
660 public function clearPathElement() {
661 $this->pathelement = array();
663 public function getNameSpace() {
664 if (!isset($this->name_space)) {
665 return '';
667 return $this->name_space;
669 public function setNameSpace($val) {
670 $this->name_space = $val;
671 return $this;
673 public function clearNameSpace() {
674 unset($this->name_space);
675 return $this;
677 public function hasNameSpace() {
678 return isset($this->name_space);
680 public function clear() {
681 $this->clearApp();
682 $this->clearPathElement();
683 $this->clearNameSpace();
685 public function byteSizePartial() {
686 $res = 0;
687 if (isset($this->app)) {
688 $res += 1;
689 $res += $this->lengthString(strlen($this->app));
691 $this->checkProtoArray($this->pathelement);
692 $res += 2 * sizeof($this->pathelement);
693 foreach ($this->pathelement as $value) {
694 $res += $value->byteSizePartial();
696 if (isset($this->name_space)) {
697 $res += 2;
698 $res += $this->lengthString(strlen($this->name_space));
700 return $res;
702 public function outputPartial($out) {
703 if (isset($this->app)) {
704 $out->putVarInt32(106);
705 $out->putPrefixedString($this->app);
707 $this->checkProtoArray($this->pathelement);
708 foreach ($this->pathelement as $value) {
709 $out->putVarInt32(115);
710 $value->outputPartial($out);
711 $out->putVarInt32(116);
713 if (isset($this->name_space)) {
714 $out->putVarInt32(162);
715 $out->putPrefixedString($this->name_space);
718 public function tryMerge($d) {
719 while($d->avail() > 0) {
720 $tt = $d->getVarInt32();
721 switch ($tt) {
722 case 100: return;
723 case 106:
724 $length = $d->getVarInt32();
725 $this->setApp(substr($d->buffer(), $d->pos(), $length));
726 $d->skip($length);
727 break;
728 case 115:
729 $this->addPathElement()->tryMerge($d);
730 break;
731 case 162:
732 $length = $d->getVarInt32();
733 $this->setNameSpace(substr($d->buffer(), $d->pos(), $length));
734 $d->skip($length);
735 break;
736 case 0:
737 throw new \google\net\ProtocolBufferDecodeError();
738 break;
739 default:
740 $d->skipData($tt);
744 public function checkInitialized() {
745 if (!isset($this->app)) return 'app';
746 foreach ($this->pathelement as $value) {
747 if (!$value->isInitialized()) return 'pathelement';
749 return null;
751 public function mergeFrom($x) {
752 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
753 if ($x->hasApp()) {
754 $this->setApp($x->getApp());
756 foreach ($x->getPathElementList() as $v) {
757 $this->addPathElement()->copyFrom($v);
759 if ($x->hasNameSpace()) {
760 $this->setNameSpace($x->getNameSpace());
763 public function equals($x) {
764 if ($x === $this) { return true; }
765 if (isset($this->app) !== isset($x->app)) return false;
766 if (isset($this->app) && $this->app !== $x->app) return false;
767 if (sizeof($this->pathelement) !== sizeof($x->pathelement)) return false;
768 foreach (array_map(null, $this->pathelement, $x->pathelement) as $v) {
769 if (!$v[0]->equals($v[1])) return false;
771 if (isset($this->name_space) !== isset($x->name_space)) return false;
772 if (isset($this->name_space) && $this->name_space !== $x->name_space) return false;
773 return true;
775 public function shortDebugString($prefix = "") {
776 $res = '';
777 if (isset($this->app)) {
778 $res .= $prefix . "app: " . $this->debugFormatString($this->app) . "\n";
780 foreach ($this->pathelement as $value) {
781 $res .= $prefix . "PathElement {\n" . $value->shortDebugString($prefix . " ") . $prefix . "}\n";
783 if (isset($this->name_space)) {
784 $res .= $prefix . "name_space: " . $this->debugFormatString($this->name_space) . "\n";
786 return $res;
790 namespace storage_onestore_v3 {
791 class PropertyValue extends \google\net\ProtocolMessage {
792 public function getInt64Value() {
793 if (!isset($this->int64Value)) {
794 return "0";
796 return $this->int64Value;
798 public function setInt64Value($val) {
799 if (is_double($val)) {
800 $this->int64Value = sprintf('%0.0F', $val);
801 } else {
802 $this->int64Value = $val;
804 return $this;
806 public function clearInt64Value() {
807 unset($this->int64Value);
808 return $this;
810 public function hasInt64Value() {
811 return isset($this->int64Value);
813 public function getBooleanvalue() {
814 if (!isset($this->booleanValue)) {
815 return false;
817 return $this->booleanValue;
819 public function setBooleanvalue($val) {
820 $this->booleanValue = $val;
821 return $this;
823 public function clearBooleanvalue() {
824 unset($this->booleanValue);
825 return $this;
827 public function hasBooleanvalue() {
828 return isset($this->booleanValue);
830 public function getStringvalue() {
831 if (!isset($this->stringValue)) {
832 return '';
834 return $this->stringValue;
836 public function setStringvalue($val) {
837 $this->stringValue = $val;
838 return $this;
840 public function clearStringvalue() {
841 unset($this->stringValue);
842 return $this;
844 public function hasStringvalue() {
845 return isset($this->stringValue);
847 public function getDoublevalue() {
848 if (!isset($this->doubleValue)) {
849 return 0.0;
851 return $this->doubleValue;
853 public function setDoublevalue($val) {
854 $this->doubleValue = $val;
855 return $this;
857 public function clearDoublevalue() {
858 unset($this->doubleValue);
859 return $this;
861 public function hasDoublevalue() {
862 return isset($this->doubleValue);
864 public function getPointValue() {
865 if (!isset($this->pointvalue)) {
866 return new \storage_onestore_v3\PropertyValue\PointValue();
868 return $this->pointvalue;
870 public function mutablePointValue() {
871 if (!isset($this->pointvalue)) {
872 $res = new \storage_onestore_v3\PropertyValue\PointValue();
873 $this->pointvalue = $res;
874 return $res;
876 return $this->pointvalue;
878 public function clearPointValue() {
879 if (isset($this->pointvalue)) {
880 unset($this->pointvalue);
883 public function hasPointValue() {
884 return isset($this->pointvalue);
886 public function getUserValue() {
887 if (!isset($this->uservalue)) {
888 return new \storage_onestore_v3\PropertyValue\UserValue();
890 return $this->uservalue;
892 public function mutableUserValue() {
893 if (!isset($this->uservalue)) {
894 $res = new \storage_onestore_v3\PropertyValue\UserValue();
895 $this->uservalue = $res;
896 return $res;
898 return $this->uservalue;
900 public function clearUserValue() {
901 if (isset($this->uservalue)) {
902 unset($this->uservalue);
905 public function hasUserValue() {
906 return isset($this->uservalue);
908 public function getReferenceValue() {
909 if (!isset($this->referencevalue)) {
910 return new \storage_onestore_v3\PropertyValue\ReferenceValue();
912 return $this->referencevalue;
914 public function mutableReferenceValue() {
915 if (!isset($this->referencevalue)) {
916 $res = new \storage_onestore_v3\PropertyValue\ReferenceValue();
917 $this->referencevalue = $res;
918 return $res;
920 return $this->referencevalue;
922 public function clearReferenceValue() {
923 if (isset($this->referencevalue)) {
924 unset($this->referencevalue);
927 public function hasReferenceValue() {
928 return isset($this->referencevalue);
930 public function clear() {
931 $this->clearInt64Value();
932 $this->clearBooleanvalue();
933 $this->clearStringvalue();
934 $this->clearDoublevalue();
935 $this->clearPointValue();
936 $this->clearUserValue();
937 $this->clearReferenceValue();
939 public function byteSizePartial() {
940 $res = 0;
941 if (isset($this->int64Value)) {
942 $res += 1;
943 $res += $this->lengthVarInt64($this->int64Value);
945 if (isset($this->booleanValue)) {
946 $res += 2;
948 if (isset($this->stringValue)) {
949 $res += 1;
950 $res += $this->lengthString(strlen($this->stringValue));
952 if (isset($this->doubleValue)) {
953 $res += 9;
955 if (isset($this->pointvalue)) {
956 $res += 2;
957 $res += $this->pointvalue->byteSizePartial();
959 if (isset($this->uservalue)) {
960 $res += 2;
961 $res += $this->uservalue->byteSizePartial();
963 if (isset($this->referencevalue)) {
964 $res += 2;
965 $res += $this->referencevalue->byteSizePartial();
967 return $res;
969 public function outputPartial($out) {
970 if (isset($this->int64Value)) {
971 $out->putVarInt32(8);
972 $out->putVarInt64($this->int64Value);
974 if (isset($this->booleanValue)) {
975 $out->putVarInt32(16);
976 $out->putBoolean($this->booleanValue);
978 if (isset($this->stringValue)) {
979 $out->putVarInt32(26);
980 $out->putPrefixedString($this->stringValue);
982 if (isset($this->doubleValue)) {
983 $out->putVarInt32(33);
984 $out->putDouble($this->doubleValue);
986 if (isset($this->pointvalue)) {
987 $out->putVarInt32(43);
988 $this->pointvalue->outputPartial($out);
989 $out->putVarInt32(44);
991 if (isset($this->uservalue)) {
992 $out->putVarInt32(67);
993 $this->uservalue->outputPartial($out);
994 $out->putVarInt32(68);
996 if (isset($this->referencevalue)) {
997 $out->putVarInt32(99);
998 $this->referencevalue->outputPartial($out);
999 $out->putVarInt32(100);
1002 public function tryMerge($d) {
1003 while($d->avail() > 0) {
1004 $tt = $d->getVarInt32();
1005 switch ($tt) {
1006 case 8:
1007 $this->setInt64Value($d->getVarInt64());
1008 break;
1009 case 16:
1010 $this->setBooleanvalue($d->getBoolean());
1011 break;
1012 case 26:
1013 $length = $d->getVarInt32();
1014 $this->setStringvalue(substr($d->buffer(), $d->pos(), $length));
1015 $d->skip($length);
1016 break;
1017 case 33:
1018 $this->setDoublevalue($d->getDouble());
1019 break;
1020 case 43:
1021 $this->mutablePointValue()->tryMerge($d);
1022 break;
1023 case 67:
1024 $this->mutableUserValue()->tryMerge($d);
1025 break;
1026 case 99:
1027 $this->mutableReferenceValue()->tryMerge($d);
1028 break;
1029 case 0:
1030 throw new \google\net\ProtocolBufferDecodeError();
1031 break;
1032 default:
1033 $d->skipData($tt);
1037 public function checkInitialized() {
1038 if (isset($this->pointvalue) && (!$this->pointvalue->isInitialized())) return 'pointvalue';
1039 if (isset($this->uservalue) && (!$this->uservalue->isInitialized())) return 'uservalue';
1040 if (isset($this->referencevalue) && (!$this->referencevalue->isInitialized())) return 'referencevalue';
1041 return null;
1043 public function mergeFrom($x) {
1044 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
1045 if ($x->hasInt64Value()) {
1046 $this->setInt64Value($x->getInt64Value());
1048 if ($x->hasBooleanvalue()) {
1049 $this->setBooleanvalue($x->getBooleanvalue());
1051 if ($x->hasStringvalue()) {
1052 $this->setStringvalue($x->getStringvalue());
1054 if ($x->hasDoublevalue()) {
1055 $this->setDoublevalue($x->getDoublevalue());
1057 if ($x->hasPointValue()) {
1058 $this->mutablePointValue()->mergeFrom($x->getPointValue());
1060 if ($x->hasUserValue()) {
1061 $this->mutableUserValue()->mergeFrom($x->getUserValue());
1063 if ($x->hasReferenceValue()) {
1064 $this->mutableReferenceValue()->mergeFrom($x->getReferenceValue());
1067 public function equals($x) {
1068 if ($x === $this) { return true; }
1069 if (isset($this->int64Value) !== isset($x->int64Value)) return false;
1070 if (isset($this->int64Value) && !$this->integerEquals($this->int64Value, $x->int64Value)) return false;
1071 if (isset($this->booleanValue) !== isset($x->booleanValue)) return false;
1072 if (isset($this->booleanValue) && $this->booleanValue !== $x->booleanValue) return false;
1073 if (isset($this->stringValue) !== isset($x->stringValue)) return false;
1074 if (isset($this->stringValue) && $this->stringValue !== $x->stringValue) return false;
1075 if (isset($this->doubleValue) !== isset($x->doubleValue)) return false;
1076 if (isset($this->doubleValue) && $this->doubleValue !== $x->doubleValue) return false;
1077 if (isset($this->pointvalue) !== isset($x->pointvalue)) return false;
1078 if (isset($this->pointvalue) && !$this->pointvalue->equals($x->pointvalue)) return false;
1079 if (isset($this->uservalue) !== isset($x->uservalue)) return false;
1080 if (isset($this->uservalue) && !$this->uservalue->equals($x->uservalue)) return false;
1081 if (isset($this->referencevalue) !== isset($x->referencevalue)) return false;
1082 if (isset($this->referencevalue) && !$this->referencevalue->equals($x->referencevalue)) return false;
1083 return true;
1085 public function shortDebugString($prefix = "") {
1086 $res = '';
1087 if (isset($this->int64Value)) {
1088 $res .= $prefix . "int64Value: " . $this->debugFormatInt64($this->int64Value) . "\n";
1090 if (isset($this->booleanValue)) {
1091 $res .= $prefix . "booleanValue: " . $this->debugFormatBool($this->booleanValue) . "\n";
1093 if (isset($this->stringValue)) {
1094 $res .= $prefix . "stringValue: " . $this->debugFormatString($this->stringValue) . "\n";
1096 if (isset($this->doubleValue)) {
1097 $res .= $prefix . "doubleValue: " . $this->debugFormatDouble($this->doubleValue) . "\n";
1099 if (isset($this->pointvalue)) {
1100 $res .= $prefix . "PointValue {\n" . $this->pointvalue->shortDebugString($prefix . " ") . $prefix . "}\n";
1102 if (isset($this->uservalue)) {
1103 $res .= $prefix . "UserValue {\n" . $this->uservalue->shortDebugString($prefix . " ") . $prefix . "}\n";
1105 if (isset($this->referencevalue)) {
1106 $res .= $prefix . "ReferenceValue {\n" . $this->referencevalue->shortDebugString($prefix . " ") . $prefix . "}\n";
1108 return $res;
1112 namespace storage_onestore_v3\Property {
1113 class Meaning {
1114 const NO_MEANING = 0;
1115 const BLOB = 14;
1116 const TEXT = 15;
1117 const BYTESTRING = 16;
1118 const ATOM_CATEGORY = 1;
1119 const ATOM_LINK = 2;
1120 const ATOM_TITLE = 3;
1121 const ATOM_CONTENT = 4;
1122 const ATOM_SUMMARY = 5;
1123 const ATOM_AUTHOR = 6;
1124 const GD_WHEN = 7;
1125 const GD_EMAIL = 8;
1126 const GEORSS_POINT = 9;
1127 const GD_IM = 10;
1128 const GD_PHONENUMBER = 11;
1129 const GD_POSTALADDRESS = 12;
1130 const GD_RATING = 13;
1131 const BLOBKEY = 17;
1132 const ENTITY_PROTO = 19;
1133 const INDEX_VALUE = 18;
1136 namespace storage_onestore_v3 {
1137 class Property extends \google\net\ProtocolMessage {
1138 public function getMeaning() {
1139 if (!isset($this->meaning)) {
1140 return 0;
1142 return $this->meaning;
1144 public function setMeaning($val) {
1145 $this->meaning = $val;
1146 return $this;
1148 public function clearMeaning() {
1149 unset($this->meaning);
1150 return $this;
1152 public function hasMeaning() {
1153 return isset($this->meaning);
1155 public function getMeaningUri() {
1156 if (!isset($this->meaning_uri)) {
1157 return '';
1159 return $this->meaning_uri;
1161 public function setMeaningUri($val) {
1162 $this->meaning_uri = $val;
1163 return $this;
1165 public function clearMeaningUri() {
1166 unset($this->meaning_uri);
1167 return $this;
1169 public function hasMeaningUri() {
1170 return isset($this->meaning_uri);
1172 public function getName() {
1173 if (!isset($this->name)) {
1174 return '';
1176 return $this->name;
1178 public function setName($val) {
1179 $this->name = $val;
1180 return $this;
1182 public function clearName() {
1183 unset($this->name);
1184 return $this;
1186 public function hasName() {
1187 return isset($this->name);
1189 public function getMultiple() {
1190 if (!isset($this->multiple)) {
1191 return false;
1193 return $this->multiple;
1195 public function setMultiple($val) {
1196 $this->multiple = $val;
1197 return $this;
1199 public function clearMultiple() {
1200 unset($this->multiple);
1201 return $this;
1203 public function hasMultiple() {
1204 return isset($this->multiple);
1206 public function getValue() {
1207 if (!isset($this->value)) {
1208 return new \storage_onestore_v3\PropertyValue();
1210 return $this->value;
1212 public function mutableValue() {
1213 if (!isset($this->value)) {
1214 $res = new \storage_onestore_v3\PropertyValue();
1215 $this->value = $res;
1216 return $res;
1218 return $this->value;
1220 public function clearValue() {
1221 if (isset($this->value)) {
1222 unset($this->value);
1225 public function hasValue() {
1226 return isset($this->value);
1228 public function getEmbedded() {
1229 if (!isset($this->embedded)) {
1230 return false;
1232 return $this->embedded;
1234 public function setEmbedded($val) {
1235 $this->embedded = $val;
1236 return $this;
1238 public function clearEmbedded() {
1239 unset($this->embedded);
1240 return $this;
1242 public function hasEmbedded() {
1243 return isset($this->embedded);
1245 public function clear() {
1246 $this->clearMeaning();
1247 $this->clearMeaningUri();
1248 $this->clearName();
1249 $this->clearMultiple();
1250 $this->clearValue();
1251 $this->clearEmbedded();
1253 public function byteSizePartial() {
1254 $res = 0;
1255 if (isset($this->meaning)) {
1256 $res += 1;
1257 $res += $this->lengthVarInt64($this->meaning);
1259 if (isset($this->meaning_uri)) {
1260 $res += 1;
1261 $res += $this->lengthString(strlen($this->meaning_uri));
1263 if (isset($this->name)) {
1264 $res += 1;
1265 $res += $this->lengthString(strlen($this->name));
1267 if (isset($this->multiple)) {
1268 $res += 2;
1270 if (isset($this->value)) {
1271 $res += 1;
1272 $res += $this->lengthString($this->value->byteSizePartial());
1274 if (isset($this->embedded)) {
1275 $res += 2;
1277 return $res;
1279 public function outputPartial($out) {
1280 if (isset($this->meaning)) {
1281 $out->putVarInt32(8);
1282 $out->putVarInt32($this->meaning);
1284 if (isset($this->meaning_uri)) {
1285 $out->putVarInt32(18);
1286 $out->putPrefixedString($this->meaning_uri);
1288 if (isset($this->name)) {
1289 $out->putVarInt32(26);
1290 $out->putPrefixedString($this->name);
1292 if (isset($this->multiple)) {
1293 $out->putVarInt32(32);
1294 $out->putBoolean($this->multiple);
1296 if (isset($this->value)) {
1297 $out->putVarInt32(42);
1298 $out->putVarInt32($this->value->byteSizePartial());
1299 $this->value->outputPartial($out);
1301 if (isset($this->embedded)) {
1302 $out->putVarInt32(48);
1303 $out->putBoolean($this->embedded);
1306 public function tryMerge($d) {
1307 while($d->avail() > 0) {
1308 $tt = $d->getVarInt32();
1309 switch ($tt) {
1310 case 8:
1311 $this->setMeaning($d->getVarInt32());
1312 break;
1313 case 18:
1314 $length = $d->getVarInt32();
1315 $this->setMeaningUri(substr($d->buffer(), $d->pos(), $length));
1316 $d->skip($length);
1317 break;
1318 case 26:
1319 $length = $d->getVarInt32();
1320 $this->setName(substr($d->buffer(), $d->pos(), $length));
1321 $d->skip($length);
1322 break;
1323 case 32:
1324 $this->setMultiple($d->getBoolean());
1325 break;
1326 case 42:
1327 $length = $d->getVarInt32();
1328 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
1329 $d->skip($length);
1330 $this->mutableValue()->tryMerge($tmp);
1331 break;
1332 case 48:
1333 $this->setEmbedded($d->getBoolean());
1334 break;
1335 case 0:
1336 throw new \google\net\ProtocolBufferDecodeError();
1337 break;
1338 default:
1339 $d->skipData($tt);
1343 public function checkInitialized() {
1344 if (!isset($this->name)) return 'name';
1345 if (!isset($this->multiple)) return 'multiple';
1346 if ((!isset($this->value)) || (!$this->value->isInitialized())) return 'value';
1347 return null;
1349 public function mergeFrom($x) {
1350 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
1351 if ($x->hasMeaning()) {
1352 $this->setMeaning($x->getMeaning());
1354 if ($x->hasMeaningUri()) {
1355 $this->setMeaningUri($x->getMeaningUri());
1357 if ($x->hasName()) {
1358 $this->setName($x->getName());
1360 if ($x->hasMultiple()) {
1361 $this->setMultiple($x->getMultiple());
1363 if ($x->hasValue()) {
1364 $this->mutableValue()->mergeFrom($x->getValue());
1366 if ($x->hasEmbedded()) {
1367 $this->setEmbedded($x->getEmbedded());
1370 public function equals($x) {
1371 if ($x === $this) { return true; }
1372 if (isset($this->meaning) !== isset($x->meaning)) return false;
1373 if (isset($this->meaning) && $this->meaning !== $x->meaning) return false;
1374 if (isset($this->meaning_uri) !== isset($x->meaning_uri)) return false;
1375 if (isset($this->meaning_uri) && $this->meaning_uri !== $x->meaning_uri) return false;
1376 if (isset($this->name) !== isset($x->name)) return false;
1377 if (isset($this->name) && $this->name !== $x->name) return false;
1378 if (isset($this->multiple) !== isset($x->multiple)) return false;
1379 if (isset($this->multiple) && $this->multiple !== $x->multiple) return false;
1380 if (isset($this->value) !== isset($x->value)) return false;
1381 if (isset($this->value) && !$this->value->equals($x->value)) return false;
1382 if (isset($this->embedded) !== isset($x->embedded)) return false;
1383 if (isset($this->embedded) && $this->embedded !== $x->embedded) return false;
1384 return true;
1386 public function shortDebugString($prefix = "") {
1387 $res = '';
1388 if (isset($this->meaning)) {
1389 $res .= $prefix . "meaning: " . ($this->meaning) . "\n";
1391 if (isset($this->meaning_uri)) {
1392 $res .= $prefix . "meaning_uri: " . $this->debugFormatString($this->meaning_uri) . "\n";
1394 if (isset($this->name)) {
1395 $res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
1397 if (isset($this->multiple)) {
1398 $res .= $prefix . "multiple: " . $this->debugFormatBool($this->multiple) . "\n";
1400 if (isset($this->value)) {
1401 $res .= $prefix . "value <\n" . $this->value->shortDebugString($prefix . " ") . $prefix . ">\n";
1403 if (isset($this->embedded)) {
1404 $res .= $prefix . "embedded: " . $this->debugFormatBool($this->embedded) . "\n";
1406 return $res;
1410 namespace storage_onestore_v3\Path {
1411 class Element extends \google\net\ProtocolMessage {
1412 public function getType() {
1413 if (!isset($this->type)) {
1414 return '';
1416 return $this->type;
1418 public function setType($val) {
1419 $this->type = $val;
1420 return $this;
1422 public function clearType() {
1423 unset($this->type);
1424 return $this;
1426 public function hasType() {
1427 return isset($this->type);
1429 public function getId() {
1430 if (!isset($this->id)) {
1431 return "0";
1433 return $this->id;
1435 public function setId($val) {
1436 if (is_double($val)) {
1437 $this->id = sprintf('%0.0F', $val);
1438 } else {
1439 $this->id = $val;
1441 return $this;
1443 public function clearId() {
1444 unset($this->id);
1445 return $this;
1447 public function hasId() {
1448 return isset($this->id);
1450 public function getName() {
1451 if (!isset($this->name)) {
1452 return '';
1454 return $this->name;
1456 public function setName($val) {
1457 $this->name = $val;
1458 return $this;
1460 public function clearName() {
1461 unset($this->name);
1462 return $this;
1464 public function hasName() {
1465 return isset($this->name);
1467 public function clear() {
1468 $this->clearType();
1469 $this->clearId();
1470 $this->clearName();
1472 public function byteSizePartial() {
1473 $res = 0;
1474 if (isset($this->type)) {
1475 $res += 1;
1476 $res += $this->lengthString(strlen($this->type));
1478 if (isset($this->id)) {
1479 $res += 1;
1480 $res += $this->lengthVarInt64($this->id);
1482 if (isset($this->name)) {
1483 $res += 1;
1484 $res += $this->lengthString(strlen($this->name));
1486 return $res;
1488 public function outputPartial($out) {
1489 if (isset($this->type)) {
1490 $out->putVarInt32(18);
1491 $out->putPrefixedString($this->type);
1493 if (isset($this->id)) {
1494 $out->putVarInt32(24);
1495 $out->putVarInt64($this->id);
1497 if (isset($this->name)) {
1498 $out->putVarInt32(34);
1499 $out->putPrefixedString($this->name);
1502 public function tryMerge($d) {
1503 while($d->avail() > 0) {
1504 $tt = $d->getVarInt32();
1505 switch ($tt) {
1506 case 12: return;
1507 case 18:
1508 $length = $d->getVarInt32();
1509 $this->setType(substr($d->buffer(), $d->pos(), $length));
1510 $d->skip($length);
1511 break;
1512 case 24:
1513 $this->setId($d->getVarInt64());
1514 break;
1515 case 34:
1516 $length = $d->getVarInt32();
1517 $this->setName(substr($d->buffer(), $d->pos(), $length));
1518 $d->skip($length);
1519 break;
1520 case 0:
1521 throw new \google\net\ProtocolBufferDecodeError();
1522 break;
1523 default:
1524 $d->skipData($tt);
1528 public function checkInitialized() {
1529 if (!isset($this->type)) return 'type';
1530 return null;
1532 public function mergeFrom($x) {
1533 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
1534 if ($x->hasType()) {
1535 $this->setType($x->getType());
1537 if ($x->hasId()) {
1538 $this->setId($x->getId());
1540 if ($x->hasName()) {
1541 $this->setName($x->getName());
1544 public function equals($x) {
1545 if ($x === $this) { return true; }
1546 if (isset($this->type) !== isset($x->type)) return false;
1547 if (isset($this->type) && $this->type !== $x->type) return false;
1548 if (isset($this->id) !== isset($x->id)) return false;
1549 if (isset($this->id) && !$this->integerEquals($this->id, $x->id)) return false;
1550 if (isset($this->name) !== isset($x->name)) return false;
1551 if (isset($this->name) && $this->name !== $x->name) return false;
1552 return true;
1554 public function shortDebugString($prefix = "") {
1555 $res = '';
1556 if (isset($this->type)) {
1557 $res .= $prefix . "type: " . $this->debugFormatString($this->type) . "\n";
1559 if (isset($this->id)) {
1560 $res .= $prefix . "id: " . $this->debugFormatInt64($this->id) . "\n";
1562 if (isset($this->name)) {
1563 $res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
1565 return $res;
1569 namespace storage_onestore_v3 {
1570 class Path extends \google\net\ProtocolMessage {
1571 private $element = array();
1572 public function getElementSize() {
1573 return sizeof($this->element);
1575 public function getElementList() {
1576 return $this->element;
1578 public function mutableElement($idx) {
1579 if (!isset($this->element[$idx])) {
1580 $val = new \storage_onestore_v3\Path\Element();
1581 $this->element[$idx] = $val;
1582 return $val;
1584 return $this->element[$idx];
1586 public function getElement($idx) {
1587 if (isset($this->element[$idx])) {
1588 return $this->element[$idx];
1590 if ($idx >= end(array_keys($this->element))) {
1591 throw new \OutOfRangeException('index out of range: ' + $idx);
1593 return new \storage_onestore_v3\Path\Element();
1595 public function addElement() {
1596 $val = new \storage_onestore_v3\Path\Element();
1597 $this->element[] = $val;
1598 return $val;
1600 public function clearElement() {
1601 $this->element = array();
1603 public function clear() {
1604 $this->clearElement();
1606 public function byteSizePartial() {
1607 $res = 0;
1608 $this->checkProtoArray($this->element);
1609 $res += 2 * sizeof($this->element);
1610 foreach ($this->element as $value) {
1611 $res += $value->byteSizePartial();
1613 return $res;
1615 public function outputPartial($out) {
1616 $this->checkProtoArray($this->element);
1617 foreach ($this->element as $value) {
1618 $out->putVarInt32(11);
1619 $value->outputPartial($out);
1620 $out->putVarInt32(12);
1623 public function tryMerge($d) {
1624 while($d->avail() > 0) {
1625 $tt = $d->getVarInt32();
1626 switch ($tt) {
1627 case 11:
1628 $this->addElement()->tryMerge($d);
1629 break;
1630 case 0:
1631 throw new \google\net\ProtocolBufferDecodeError();
1632 break;
1633 default:
1634 $d->skipData($tt);
1638 public function checkInitialized() {
1639 foreach ($this->element as $value) {
1640 if (!$value->isInitialized()) return 'element';
1642 return null;
1644 public function mergeFrom($x) {
1645 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
1646 foreach ($x->getElementList() as $v) {
1647 $this->addElement()->copyFrom($v);
1650 public function equals($x) {
1651 if ($x === $this) { return true; }
1652 if (sizeof($this->element) !== sizeof($x->element)) return false;
1653 foreach (array_map(null, $this->element, $x->element) as $v) {
1654 if (!$v[0]->equals($v[1])) return false;
1656 return true;
1658 public function shortDebugString($prefix = "") {
1659 $res = '';
1660 foreach ($this->element as $value) {
1661 $res .= $prefix . "Element {\n" . $value->shortDebugString($prefix . " ") . $prefix . "}\n";
1663 return $res;
1667 namespace storage_onestore_v3 {
1668 class Reference extends \google\net\ProtocolMessage {
1669 public function getApp() {
1670 if (!isset($this->app)) {
1671 return '';
1673 return $this->app;
1675 public function setApp($val) {
1676 $this->app = $val;
1677 return $this;
1679 public function clearApp() {
1680 unset($this->app);
1681 return $this;
1683 public function hasApp() {
1684 return isset($this->app);
1686 public function getPath() {
1687 if (!isset($this->path)) {
1688 return new \storage_onestore_v3\Path();
1690 return $this->path;
1692 public function mutablePath() {
1693 if (!isset($this->path)) {
1694 $res = new \storage_onestore_v3\Path();
1695 $this->path = $res;
1696 return $res;
1698 return $this->path;
1700 public function clearPath() {
1701 if (isset($this->path)) {
1702 unset($this->path);
1705 public function hasPath() {
1706 return isset($this->path);
1708 public function getNameSpace() {
1709 if (!isset($this->name_space)) {
1710 return '';
1712 return $this->name_space;
1714 public function setNameSpace($val) {
1715 $this->name_space = $val;
1716 return $this;
1718 public function clearNameSpace() {
1719 unset($this->name_space);
1720 return $this;
1722 public function hasNameSpace() {
1723 return isset($this->name_space);
1725 public function clear() {
1726 $this->clearApp();
1727 $this->clearPath();
1728 $this->clearNameSpace();
1730 public function byteSizePartial() {
1731 $res = 0;
1732 if (isset($this->app)) {
1733 $res += 1;
1734 $res += $this->lengthString(strlen($this->app));
1736 if (isset($this->path)) {
1737 $res += 1;
1738 $res += $this->lengthString($this->path->byteSizePartial());
1740 if (isset($this->name_space)) {
1741 $res += 2;
1742 $res += $this->lengthString(strlen($this->name_space));
1744 return $res;
1746 public function outputPartial($out) {
1747 if (isset($this->app)) {
1748 $out->putVarInt32(106);
1749 $out->putPrefixedString($this->app);
1751 if (isset($this->path)) {
1752 $out->putVarInt32(114);
1753 $out->putVarInt32($this->path->byteSizePartial());
1754 $this->path->outputPartial($out);
1756 if (isset($this->name_space)) {
1757 $out->putVarInt32(162);
1758 $out->putPrefixedString($this->name_space);
1761 public function tryMerge($d) {
1762 while($d->avail() > 0) {
1763 $tt = $d->getVarInt32();
1764 switch ($tt) {
1765 case 106:
1766 $length = $d->getVarInt32();
1767 $this->setApp(substr($d->buffer(), $d->pos(), $length));
1768 $d->skip($length);
1769 break;
1770 case 114:
1771 $length = $d->getVarInt32();
1772 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
1773 $d->skip($length);
1774 $this->mutablePath()->tryMerge($tmp);
1775 break;
1776 case 162:
1777 $length = $d->getVarInt32();
1778 $this->setNameSpace(substr($d->buffer(), $d->pos(), $length));
1779 $d->skip($length);
1780 break;
1781 case 0:
1782 throw new \google\net\ProtocolBufferDecodeError();
1783 break;
1784 default:
1785 $d->skipData($tt);
1789 public function checkInitialized() {
1790 if (!isset($this->app)) return 'app';
1791 if ((!isset($this->path)) || (!$this->path->isInitialized())) return 'path';
1792 return null;
1794 public function mergeFrom($x) {
1795 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
1796 if ($x->hasApp()) {
1797 $this->setApp($x->getApp());
1799 if ($x->hasPath()) {
1800 $this->mutablePath()->mergeFrom($x->getPath());
1802 if ($x->hasNameSpace()) {
1803 $this->setNameSpace($x->getNameSpace());
1806 public function equals($x) {
1807 if ($x === $this) { return true; }
1808 if (isset($this->app) !== isset($x->app)) return false;
1809 if (isset($this->app) && $this->app !== $x->app) return false;
1810 if (isset($this->path) !== isset($x->path)) return false;
1811 if (isset($this->path) && !$this->path->equals($x->path)) return false;
1812 if (isset($this->name_space) !== isset($x->name_space)) return false;
1813 if (isset($this->name_space) && $this->name_space !== $x->name_space) return false;
1814 return true;
1816 public function shortDebugString($prefix = "") {
1817 $res = '';
1818 if (isset($this->app)) {
1819 $res .= $prefix . "app: " . $this->debugFormatString($this->app) . "\n";
1821 if (isset($this->path)) {
1822 $res .= $prefix . "path <\n" . $this->path->shortDebugString($prefix . " ") . $prefix . ">\n";
1824 if (isset($this->name_space)) {
1825 $res .= $prefix . "name_space: " . $this->debugFormatString($this->name_space) . "\n";
1827 return $res;
1831 namespace storage_onestore_v3 {
1832 class User extends \google\net\ProtocolMessage {
1833 public function getEmail() {
1834 if (!isset($this->email)) {
1835 return '';
1837 return $this->email;
1839 public function setEmail($val) {
1840 $this->email = $val;
1841 return $this;
1843 public function clearEmail() {
1844 unset($this->email);
1845 return $this;
1847 public function hasEmail() {
1848 return isset($this->email);
1850 public function getAuthDomain() {
1851 if (!isset($this->auth_domain)) {
1852 return '';
1854 return $this->auth_domain;
1856 public function setAuthDomain($val) {
1857 $this->auth_domain = $val;
1858 return $this;
1860 public function clearAuthDomain() {
1861 unset($this->auth_domain);
1862 return $this;
1864 public function hasAuthDomain() {
1865 return isset($this->auth_domain);
1867 public function getNickname() {
1868 if (!isset($this->nickname)) {
1869 return '';
1871 return $this->nickname;
1873 public function setNickname($val) {
1874 $this->nickname = $val;
1875 return $this;
1877 public function clearNickname() {
1878 unset($this->nickname);
1879 return $this;
1881 public function hasNickname() {
1882 return isset($this->nickname);
1884 public function getGaiaid() {
1885 if (!isset($this->gaiaid)) {
1886 return "0";
1888 return $this->gaiaid;
1890 public function setGaiaid($val) {
1891 if (is_double($val)) {
1892 $this->gaiaid = sprintf('%0.0F', $val);
1893 } else {
1894 $this->gaiaid = $val;
1896 return $this;
1898 public function clearGaiaid() {
1899 unset($this->gaiaid);
1900 return $this;
1902 public function hasGaiaid() {
1903 return isset($this->gaiaid);
1905 public function getObfuscatedGaiaid() {
1906 if (!isset($this->obfuscated_gaiaid)) {
1907 return '';
1909 return $this->obfuscated_gaiaid;
1911 public function setObfuscatedGaiaid($val) {
1912 $this->obfuscated_gaiaid = $val;
1913 return $this;
1915 public function clearObfuscatedGaiaid() {
1916 unset($this->obfuscated_gaiaid);
1917 return $this;
1919 public function hasObfuscatedGaiaid() {
1920 return isset($this->obfuscated_gaiaid);
1922 public function getFederatedIdentity() {
1923 if (!isset($this->federated_identity)) {
1924 return '';
1926 return $this->federated_identity;
1928 public function setFederatedIdentity($val) {
1929 $this->federated_identity = $val;
1930 return $this;
1932 public function clearFederatedIdentity() {
1933 unset($this->federated_identity);
1934 return $this;
1936 public function hasFederatedIdentity() {
1937 return isset($this->federated_identity);
1939 public function getFederatedProvider() {
1940 if (!isset($this->federated_provider)) {
1941 return '';
1943 return $this->federated_provider;
1945 public function setFederatedProvider($val) {
1946 $this->federated_provider = $val;
1947 return $this;
1949 public function clearFederatedProvider() {
1950 unset($this->federated_provider);
1951 return $this;
1953 public function hasFederatedProvider() {
1954 return isset($this->federated_provider);
1956 public function clear() {
1957 $this->clearEmail();
1958 $this->clearAuthDomain();
1959 $this->clearNickname();
1960 $this->clearGaiaid();
1961 $this->clearObfuscatedGaiaid();
1962 $this->clearFederatedIdentity();
1963 $this->clearFederatedProvider();
1965 public function byteSizePartial() {
1966 $res = 0;
1967 if (isset($this->email)) {
1968 $res += 1;
1969 $res += $this->lengthString(strlen($this->email));
1971 if (isset($this->auth_domain)) {
1972 $res += 1;
1973 $res += $this->lengthString(strlen($this->auth_domain));
1975 if (isset($this->nickname)) {
1976 $res += 1;
1977 $res += $this->lengthString(strlen($this->nickname));
1979 if (isset($this->gaiaid)) {
1980 $res += 1;
1981 $res += $this->lengthVarInt64($this->gaiaid);
1983 if (isset($this->obfuscated_gaiaid)) {
1984 $res += 1;
1985 $res += $this->lengthString(strlen($this->obfuscated_gaiaid));
1987 if (isset($this->federated_identity)) {
1988 $res += 1;
1989 $res += $this->lengthString(strlen($this->federated_identity));
1991 if (isset($this->federated_provider)) {
1992 $res += 1;
1993 $res += $this->lengthString(strlen($this->federated_provider));
1995 return $res;
1997 public function outputPartial($out) {
1998 if (isset($this->email)) {
1999 $out->putVarInt32(10);
2000 $out->putPrefixedString($this->email);
2002 if (isset($this->auth_domain)) {
2003 $out->putVarInt32(18);
2004 $out->putPrefixedString($this->auth_domain);
2006 if (isset($this->nickname)) {
2007 $out->putVarInt32(26);
2008 $out->putPrefixedString($this->nickname);
2010 if (isset($this->gaiaid)) {
2011 $out->putVarInt32(32);
2012 $out->putVarInt64($this->gaiaid);
2014 if (isset($this->obfuscated_gaiaid)) {
2015 $out->putVarInt32(42);
2016 $out->putPrefixedString($this->obfuscated_gaiaid);
2018 if (isset($this->federated_identity)) {
2019 $out->putVarInt32(50);
2020 $out->putPrefixedString($this->federated_identity);
2022 if (isset($this->federated_provider)) {
2023 $out->putVarInt32(58);
2024 $out->putPrefixedString($this->federated_provider);
2027 public function tryMerge($d) {
2028 while($d->avail() > 0) {
2029 $tt = $d->getVarInt32();
2030 switch ($tt) {
2031 case 10:
2032 $length = $d->getVarInt32();
2033 $this->setEmail(substr($d->buffer(), $d->pos(), $length));
2034 $d->skip($length);
2035 break;
2036 case 18:
2037 $length = $d->getVarInt32();
2038 $this->setAuthDomain(substr($d->buffer(), $d->pos(), $length));
2039 $d->skip($length);
2040 break;
2041 case 26:
2042 $length = $d->getVarInt32();
2043 $this->setNickname(substr($d->buffer(), $d->pos(), $length));
2044 $d->skip($length);
2045 break;
2046 case 32:
2047 $this->setGaiaid($d->getVarInt64());
2048 break;
2049 case 42:
2050 $length = $d->getVarInt32();
2051 $this->setObfuscatedGaiaid(substr($d->buffer(), $d->pos(), $length));
2052 $d->skip($length);
2053 break;
2054 case 50:
2055 $length = $d->getVarInt32();
2056 $this->setFederatedIdentity(substr($d->buffer(), $d->pos(), $length));
2057 $d->skip($length);
2058 break;
2059 case 58:
2060 $length = $d->getVarInt32();
2061 $this->setFederatedProvider(substr($d->buffer(), $d->pos(), $length));
2062 $d->skip($length);
2063 break;
2064 case 0:
2065 throw new \google\net\ProtocolBufferDecodeError();
2066 break;
2067 default:
2068 $d->skipData($tt);
2072 public function checkInitialized() {
2073 if (!isset($this->email)) return 'email';
2074 if (!isset($this->auth_domain)) return 'auth_domain';
2075 if (!isset($this->gaiaid)) return 'gaiaid';
2076 return null;
2078 public function mergeFrom($x) {
2079 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2080 if ($x->hasEmail()) {
2081 $this->setEmail($x->getEmail());
2083 if ($x->hasAuthDomain()) {
2084 $this->setAuthDomain($x->getAuthDomain());
2086 if ($x->hasNickname()) {
2087 $this->setNickname($x->getNickname());
2089 if ($x->hasGaiaid()) {
2090 $this->setGaiaid($x->getGaiaid());
2092 if ($x->hasObfuscatedGaiaid()) {
2093 $this->setObfuscatedGaiaid($x->getObfuscatedGaiaid());
2095 if ($x->hasFederatedIdentity()) {
2096 $this->setFederatedIdentity($x->getFederatedIdentity());
2098 if ($x->hasFederatedProvider()) {
2099 $this->setFederatedProvider($x->getFederatedProvider());
2102 public function equals($x) {
2103 if ($x === $this) { return true; }
2104 if (isset($this->email) !== isset($x->email)) return false;
2105 if (isset($this->email) && $this->email !== $x->email) return false;
2106 if (isset($this->auth_domain) !== isset($x->auth_domain)) return false;
2107 if (isset($this->auth_domain) && $this->auth_domain !== $x->auth_domain) return false;
2108 if (isset($this->nickname) !== isset($x->nickname)) return false;
2109 if (isset($this->nickname) && $this->nickname !== $x->nickname) return false;
2110 if (isset($this->gaiaid) !== isset($x->gaiaid)) return false;
2111 if (isset($this->gaiaid) && !$this->integerEquals($this->gaiaid, $x->gaiaid)) return false;
2112 if (isset($this->obfuscated_gaiaid) !== isset($x->obfuscated_gaiaid)) return false;
2113 if (isset($this->obfuscated_gaiaid) && $this->obfuscated_gaiaid !== $x->obfuscated_gaiaid) return false;
2114 if (isset($this->federated_identity) !== isset($x->federated_identity)) return false;
2115 if (isset($this->federated_identity) && $this->federated_identity !== $x->federated_identity) return false;
2116 if (isset($this->federated_provider) !== isset($x->federated_provider)) return false;
2117 if (isset($this->federated_provider) && $this->federated_provider !== $x->federated_provider) return false;
2118 return true;
2120 public function shortDebugString($prefix = "") {
2121 $res = '';
2122 if (isset($this->email)) {
2123 $res .= $prefix . "email: " . $this->debugFormatString($this->email) . "\n";
2125 if (isset($this->auth_domain)) {
2126 $res .= $prefix . "auth_domain: " . $this->debugFormatString($this->auth_domain) . "\n";
2128 if (isset($this->nickname)) {
2129 $res .= $prefix . "nickname: " . $this->debugFormatString($this->nickname) . "\n";
2131 if (isset($this->gaiaid)) {
2132 $res .= $prefix . "gaiaid: " . $this->debugFormatInt64($this->gaiaid) . "\n";
2134 if (isset($this->obfuscated_gaiaid)) {
2135 $res .= $prefix . "obfuscated_gaiaid: " . $this->debugFormatString($this->obfuscated_gaiaid) . "\n";
2137 if (isset($this->federated_identity)) {
2138 $res .= $prefix . "federated_identity: " . $this->debugFormatString($this->federated_identity) . "\n";
2140 if (isset($this->federated_provider)) {
2141 $res .= $prefix . "federated_provider: " . $this->debugFormatString($this->federated_provider) . "\n";
2143 return $res;
2147 namespace storage_onestore_v3\EntityProto {
2148 class Kind {
2149 const GD_CONTACT = 1;
2150 const GD_EVENT = 2;
2151 const GD_MESSAGE = 3;
2154 namespace storage_onestore_v3 {
2155 class EntityProto extends \google\net\ProtocolMessage {
2156 private $property = array();
2157 private $raw_property = array();
2158 public function getKind() {
2159 if (!isset($this->kind)) {
2160 return 1;
2162 return $this->kind;
2164 public function setKind($val) {
2165 $this->kind = $val;
2166 return $this;
2168 public function clearKind() {
2169 unset($this->kind);
2170 return $this;
2172 public function hasKind() {
2173 return isset($this->kind);
2175 public function getKindUri() {
2176 if (!isset($this->kind_uri)) {
2177 return '';
2179 return $this->kind_uri;
2181 public function setKindUri($val) {
2182 $this->kind_uri = $val;
2183 return $this;
2185 public function clearKindUri() {
2186 unset($this->kind_uri);
2187 return $this;
2189 public function hasKindUri() {
2190 return isset($this->kind_uri);
2192 public function getKey() {
2193 if (!isset($this->key)) {
2194 return new \storage_onestore_v3\Reference();
2196 return $this->key;
2198 public function mutableKey() {
2199 if (!isset($this->key)) {
2200 $res = new \storage_onestore_v3\Reference();
2201 $this->key = $res;
2202 return $res;
2204 return $this->key;
2206 public function clearKey() {
2207 if (isset($this->key)) {
2208 unset($this->key);
2211 public function hasKey() {
2212 return isset($this->key);
2214 public function getPropertySize() {
2215 return sizeof($this->property);
2217 public function getPropertyList() {
2218 return $this->property;
2220 public function mutableProperty($idx) {
2221 if (!isset($this->property[$idx])) {
2222 $val = new \storage_onestore_v3\Property();
2223 $this->property[$idx] = $val;
2224 return $val;
2226 return $this->property[$idx];
2228 public function getProperty($idx) {
2229 if (isset($this->property[$idx])) {
2230 return $this->property[$idx];
2232 if ($idx >= end(array_keys($this->property))) {
2233 throw new \OutOfRangeException('index out of range: ' + $idx);
2235 return new \storage_onestore_v3\Property();
2237 public function addProperty() {
2238 $val = new \storage_onestore_v3\Property();
2239 $this->property[] = $val;
2240 return $val;
2242 public function clearProperty() {
2243 $this->property = array();
2245 public function getRawPropertySize() {
2246 return sizeof($this->raw_property);
2248 public function getRawPropertyList() {
2249 return $this->raw_property;
2251 public function mutableRawProperty($idx) {
2252 if (!isset($this->raw_property[$idx])) {
2253 $val = new \storage_onestore_v3\Property();
2254 $this->raw_property[$idx] = $val;
2255 return $val;
2257 return $this->raw_property[$idx];
2259 public function getRawProperty($idx) {
2260 if (isset($this->raw_property[$idx])) {
2261 return $this->raw_property[$idx];
2263 if ($idx >= end(array_keys($this->raw_property))) {
2264 throw new \OutOfRangeException('index out of range: ' + $idx);
2266 return new \storage_onestore_v3\Property();
2268 public function addRawProperty() {
2269 $val = new \storage_onestore_v3\Property();
2270 $this->raw_property[] = $val;
2271 return $val;
2273 public function clearRawProperty() {
2274 $this->raw_property = array();
2276 public function getEntityGroup() {
2277 if (!isset($this->entity_group)) {
2278 return new \storage_onestore_v3\Path();
2280 return $this->entity_group;
2282 public function mutableEntityGroup() {
2283 if (!isset($this->entity_group)) {
2284 $res = new \storage_onestore_v3\Path();
2285 $this->entity_group = $res;
2286 return $res;
2288 return $this->entity_group;
2290 public function clearEntityGroup() {
2291 if (isset($this->entity_group)) {
2292 unset($this->entity_group);
2295 public function hasEntityGroup() {
2296 return isset($this->entity_group);
2298 public function getOwner() {
2299 if (!isset($this->owner)) {
2300 return new \storage_onestore_v3\User();
2302 return $this->owner;
2304 public function mutableOwner() {
2305 if (!isset($this->owner)) {
2306 $res = new \storage_onestore_v3\User();
2307 $this->owner = $res;
2308 return $res;
2310 return $this->owner;
2312 public function clearOwner() {
2313 if (isset($this->owner)) {
2314 unset($this->owner);
2317 public function hasOwner() {
2318 return isset($this->owner);
2320 public function clear() {
2321 $this->clearKind();
2322 $this->clearKindUri();
2323 $this->clearKey();
2324 $this->clearProperty();
2325 $this->clearRawProperty();
2326 $this->clearEntityGroup();
2327 $this->clearOwner();
2329 public function byteSizePartial() {
2330 $res = 0;
2331 if (isset($this->kind)) {
2332 $res += 1;
2333 $res += $this->lengthVarInt64($this->kind);
2335 if (isset($this->kind_uri)) {
2336 $res += 1;
2337 $res += $this->lengthString(strlen($this->kind_uri));
2339 if (isset($this->key)) {
2340 $res += 1;
2341 $res += $this->lengthString($this->key->byteSizePartial());
2343 $this->checkProtoArray($this->property);
2344 $res += 1 * sizeof($this->property);
2345 foreach ($this->property as $value) {
2346 $res += $this->lengthString($value->byteSizePartial());
2348 $this->checkProtoArray($this->raw_property);
2349 $res += 1 * sizeof($this->raw_property);
2350 foreach ($this->raw_property as $value) {
2351 $res += $this->lengthString($value->byteSizePartial());
2353 if (isset($this->entity_group)) {
2354 $res += 2;
2355 $res += $this->lengthString($this->entity_group->byteSizePartial());
2357 if (isset($this->owner)) {
2358 $res += 2;
2359 $res += $this->lengthString($this->owner->byteSizePartial());
2361 return $res;
2363 public function outputPartial($out) {
2364 if (isset($this->kind)) {
2365 $out->putVarInt32(32);
2366 $out->putVarInt32($this->kind);
2368 if (isset($this->kind_uri)) {
2369 $out->putVarInt32(42);
2370 $out->putPrefixedString($this->kind_uri);
2372 if (isset($this->key)) {
2373 $out->putVarInt32(106);
2374 $out->putVarInt32($this->key->byteSizePartial());
2375 $this->key->outputPartial($out);
2377 $this->checkProtoArray($this->property);
2378 foreach ($this->property as $value) {
2379 $out->putVarInt32(114);
2380 $out->putVarInt32($value->byteSizePartial());
2381 $value->outputPartial($out);
2383 $this->checkProtoArray($this->raw_property);
2384 foreach ($this->raw_property as $value) {
2385 $out->putVarInt32(122);
2386 $out->putVarInt32($value->byteSizePartial());
2387 $value->outputPartial($out);
2389 if (isset($this->entity_group)) {
2390 $out->putVarInt32(130);
2391 $out->putVarInt32($this->entity_group->byteSizePartial());
2392 $this->entity_group->outputPartial($out);
2394 if (isset($this->owner)) {
2395 $out->putVarInt32(138);
2396 $out->putVarInt32($this->owner->byteSizePartial());
2397 $this->owner->outputPartial($out);
2400 public function tryMerge($d) {
2401 while($d->avail() > 0) {
2402 $tt = $d->getVarInt32();
2403 switch ($tt) {
2404 case 32:
2405 $this->setKind($d->getVarInt32());
2406 break;
2407 case 42:
2408 $length = $d->getVarInt32();
2409 $this->setKindUri(substr($d->buffer(), $d->pos(), $length));
2410 $d->skip($length);
2411 break;
2412 case 106:
2413 $length = $d->getVarInt32();
2414 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
2415 $d->skip($length);
2416 $this->mutableKey()->tryMerge($tmp);
2417 break;
2418 case 114:
2419 $length = $d->getVarInt32();
2420 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
2421 $d->skip($length);
2422 $this->addProperty()->tryMerge($tmp);
2423 break;
2424 case 122:
2425 $length = $d->getVarInt32();
2426 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
2427 $d->skip($length);
2428 $this->addRawProperty()->tryMerge($tmp);
2429 break;
2430 case 130:
2431 $length = $d->getVarInt32();
2432 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
2433 $d->skip($length);
2434 $this->mutableEntityGroup()->tryMerge($tmp);
2435 break;
2436 case 138:
2437 $length = $d->getVarInt32();
2438 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
2439 $d->skip($length);
2440 $this->mutableOwner()->tryMerge($tmp);
2441 break;
2442 case 0:
2443 throw new \google\net\ProtocolBufferDecodeError();
2444 break;
2445 default:
2446 $d->skipData($tt);
2450 public function checkInitialized() {
2451 if ((!isset($this->key)) || (!$this->key->isInitialized())) return 'key';
2452 foreach ($this->property as $value) {
2453 if (!$value->isInitialized()) return 'property';
2455 foreach ($this->raw_property as $value) {
2456 if (!$value->isInitialized()) return 'raw_property';
2458 if ((!isset($this->entity_group)) || (!$this->entity_group->isInitialized())) return 'entity_group';
2459 if (isset($this->owner) && (!$this->owner->isInitialized())) return 'owner';
2460 return null;
2462 public function mergeFrom($x) {
2463 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2464 if ($x->hasKind()) {
2465 $this->setKind($x->getKind());
2467 if ($x->hasKindUri()) {
2468 $this->setKindUri($x->getKindUri());
2470 if ($x->hasKey()) {
2471 $this->mutableKey()->mergeFrom($x->getKey());
2473 foreach ($x->getPropertyList() as $v) {
2474 $this->addProperty()->copyFrom($v);
2476 foreach ($x->getRawPropertyList() as $v) {
2477 $this->addRawProperty()->copyFrom($v);
2479 if ($x->hasEntityGroup()) {
2480 $this->mutableEntityGroup()->mergeFrom($x->getEntityGroup());
2482 if ($x->hasOwner()) {
2483 $this->mutableOwner()->mergeFrom($x->getOwner());
2486 public function equals($x) {
2487 if ($x === $this) { return true; }
2488 if (isset($this->kind) !== isset($x->kind)) return false;
2489 if (isset($this->kind) && $this->kind !== $x->kind) return false;
2490 if (isset($this->kind_uri) !== isset($x->kind_uri)) return false;
2491 if (isset($this->kind_uri) && $this->kind_uri !== $x->kind_uri) return false;
2492 if (isset($this->key) !== isset($x->key)) return false;
2493 if (isset($this->key) && !$this->key->equals($x->key)) return false;
2494 if (sizeof($this->property) !== sizeof($x->property)) return false;
2495 foreach (array_map(null, $this->property, $x->property) as $v) {
2496 if (!$v[0]->equals($v[1])) return false;
2498 if (sizeof($this->raw_property) !== sizeof($x->raw_property)) return false;
2499 foreach (array_map(null, $this->raw_property, $x->raw_property) as $v) {
2500 if (!$v[0]->equals($v[1])) return false;
2502 if (isset($this->entity_group) !== isset($x->entity_group)) return false;
2503 if (isset($this->entity_group) && !$this->entity_group->equals($x->entity_group)) return false;
2504 if (isset($this->owner) !== isset($x->owner)) return false;
2505 if (isset($this->owner) && !$this->owner->equals($x->owner)) return false;
2506 return true;
2508 public function shortDebugString($prefix = "") {
2509 $res = '';
2510 if (isset($this->kind)) {
2511 $res .= $prefix . "kind: " . ($this->kind) . "\n";
2513 if (isset($this->kind_uri)) {
2514 $res .= $prefix . "kind_uri: " . $this->debugFormatString($this->kind_uri) . "\n";
2516 if (isset($this->key)) {
2517 $res .= $prefix . "key <\n" . $this->key->shortDebugString($prefix . " ") . $prefix . ">\n";
2519 foreach ($this->property as $value) {
2520 $res .= $prefix . "property <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
2522 foreach ($this->raw_property as $value) {
2523 $res .= $prefix . "raw_property <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
2525 if (isset($this->entity_group)) {
2526 $res .= $prefix . "entity_group <\n" . $this->entity_group->shortDebugString($prefix . " ") . $prefix . ">\n";
2528 if (isset($this->owner)) {
2529 $res .= $prefix . "owner <\n" . $this->owner->shortDebugString($prefix . " ") . $prefix . ">\n";
2531 return $res;
2535 namespace storage_onestore_v3 {
2536 class CompositeProperty extends \google\net\ProtocolMessage {
2537 private $value = array();
2538 public function getIndexId() {
2539 if (!isset($this->index_id)) {
2540 return "0";
2542 return $this->index_id;
2544 public function setIndexId($val) {
2545 if (is_double($val)) {
2546 $this->index_id = sprintf('%0.0F', $val);
2547 } else {
2548 $this->index_id = $val;
2550 return $this;
2552 public function clearIndexId() {
2553 unset($this->index_id);
2554 return $this;
2556 public function hasIndexId() {
2557 return isset($this->index_id);
2559 public function getValueSize() {
2560 return sizeof($this->value);
2562 public function getValueList() {
2563 return $this->value;
2565 public function getValue($idx) {
2566 return $this->value[$idx];
2568 public function setValue($idx, $val) {
2569 $this->value[$idx] = $val;
2570 return $this;
2572 public function addValue($val) {
2573 $this->value[] = $val;
2574 return $this;
2576 public function clearValue() {
2577 $this->value = array();
2579 public function clear() {
2580 $this->clearIndexId();
2581 $this->clearValue();
2583 public function byteSizePartial() {
2584 $res = 0;
2585 if (isset($this->index_id)) {
2586 $res += 1;
2587 $res += $this->lengthVarInt64($this->index_id);
2589 $this->checkProtoArray($this->value);
2590 $res += 1 * sizeof($this->value);
2591 foreach ($this->value as $value) {
2592 $res += $this->lengthString(strlen($value));
2594 return $res;
2596 public function outputPartial($out) {
2597 if (isset($this->index_id)) {
2598 $out->putVarInt32(8);
2599 $out->putVarInt64($this->index_id);
2601 $this->checkProtoArray($this->value);
2602 foreach ($this->value as $value) {
2603 $out->putVarInt32(18);
2604 $out->putPrefixedString($value);
2607 public function tryMerge($d) {
2608 while($d->avail() > 0) {
2609 $tt = $d->getVarInt32();
2610 switch ($tt) {
2611 case 8:
2612 $this->setIndexId($d->getVarInt64());
2613 break;
2614 case 18:
2615 $length = $d->getVarInt32();
2616 $this->addValue(substr($d->buffer(), $d->pos(), $length));
2617 $d->skip($length);
2618 break;
2619 case 0:
2620 throw new \google\net\ProtocolBufferDecodeError();
2621 break;
2622 default:
2623 $d->skipData($tt);
2627 public function checkInitialized() {
2628 if (!isset($this->index_id)) return 'index_id';
2629 return null;
2631 public function mergeFrom($x) {
2632 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2633 if ($x->hasIndexId()) {
2634 $this->setIndexId($x->getIndexId());
2636 foreach ($x->getValueList() as $v) {
2637 $this->addValue($v);
2640 public function equals($x) {
2641 if ($x === $this) { return true; }
2642 if (isset($this->index_id) !== isset($x->index_id)) return false;
2643 if (isset($this->index_id) && !$this->integerEquals($this->index_id, $x->index_id)) return false;
2644 if (sizeof($this->value) !== sizeof($x->value)) return false;
2645 foreach (array_map(null, $this->value, $x->value) as $v) {
2646 if ($v[0] !== $v[1]) return false;
2648 return true;
2650 public function shortDebugString($prefix = "") {
2651 $res = '';
2652 if (isset($this->index_id)) {
2653 $res .= $prefix . "index_id: " . $this->debugFormatInt64($this->index_id) . "\n";
2655 foreach ($this->value as $value) {
2656 $res .= $prefix . "value: " . $this->debugFormatString($value) . "\n";
2658 return $res;
2662 namespace storage_onestore_v3\Index\Property {
2663 class Direction {
2664 const DIRECTION_UNSPECIFIED = 0;
2665 const ASCENDING = 1;
2666 const DESCENDING = 2;
2669 namespace storage_onestore_v3\Index\Property {
2670 class Mode {
2671 const MODE_UNSPECIFIED = 0;
2672 const GEOSPATIAL = 3;
2675 namespace storage_onestore_v3\Index {
2676 class Property extends \google\net\ProtocolMessage {
2677 public function getName() {
2678 if (!isset($this->name)) {
2679 return '';
2681 return $this->name;
2683 public function setName($val) {
2684 $this->name = $val;
2685 return $this;
2687 public function clearName() {
2688 unset($this->name);
2689 return $this;
2691 public function hasName() {
2692 return isset($this->name);
2694 public function getDirection() {
2695 if (!isset($this->direction)) {
2696 return 0;
2698 return $this->direction;
2700 public function setDirection($val) {
2701 $this->direction = $val;
2702 return $this;
2704 public function clearDirection() {
2705 unset($this->direction);
2706 return $this;
2708 public function hasDirection() {
2709 return isset($this->direction);
2711 public function getMode() {
2712 if (!isset($this->mode)) {
2713 return 0;
2715 return $this->mode;
2717 public function setMode($val) {
2718 $this->mode = $val;
2719 return $this;
2721 public function clearMode() {
2722 unset($this->mode);
2723 return $this;
2725 public function hasMode() {
2726 return isset($this->mode);
2728 public function clear() {
2729 $this->clearName();
2730 $this->clearDirection();
2731 $this->clearMode();
2733 public function byteSizePartial() {
2734 $res = 0;
2735 if (isset($this->name)) {
2736 $res += 1;
2737 $res += $this->lengthString(strlen($this->name));
2739 if (isset($this->direction)) {
2740 $res += 1;
2741 $res += $this->lengthVarInt64($this->direction);
2743 if (isset($this->mode)) {
2744 $res += 1;
2745 $res += $this->lengthVarInt64($this->mode);
2747 return $res;
2749 public function outputPartial($out) {
2750 if (isset($this->name)) {
2751 $out->putVarInt32(26);
2752 $out->putPrefixedString($this->name);
2754 if (isset($this->direction)) {
2755 $out->putVarInt32(32);
2756 $out->putVarInt32($this->direction);
2758 if (isset($this->mode)) {
2759 $out->putVarInt32(48);
2760 $out->putVarInt32($this->mode);
2763 public function tryMerge($d) {
2764 while($d->avail() > 0) {
2765 $tt = $d->getVarInt32();
2766 switch ($tt) {
2767 case 20: return;
2768 case 26:
2769 $length = $d->getVarInt32();
2770 $this->setName(substr($d->buffer(), $d->pos(), $length));
2771 $d->skip($length);
2772 break;
2773 case 32:
2774 $this->setDirection($d->getVarInt32());
2775 break;
2776 case 48:
2777 $this->setMode($d->getVarInt32());
2778 break;
2779 case 0:
2780 throw new \google\net\ProtocolBufferDecodeError();
2781 break;
2782 default:
2783 $d->skipData($tt);
2787 public function checkInitialized() {
2788 if (!isset($this->name)) return 'name';
2789 return null;
2791 public function mergeFrom($x) {
2792 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2793 if ($x->hasName()) {
2794 $this->setName($x->getName());
2796 if ($x->hasDirection()) {
2797 $this->setDirection($x->getDirection());
2799 if ($x->hasMode()) {
2800 $this->setMode($x->getMode());
2803 public function equals($x) {
2804 if ($x === $this) { return true; }
2805 if (isset($this->name) !== isset($x->name)) return false;
2806 if (isset($this->name) && $this->name !== $x->name) return false;
2807 if (isset($this->direction) !== isset($x->direction)) return false;
2808 if (isset($this->direction) && $this->direction !== $x->direction) return false;
2809 if (isset($this->mode) !== isset($x->mode)) return false;
2810 if (isset($this->mode) && $this->mode !== $x->mode) return false;
2811 return true;
2813 public function shortDebugString($prefix = "") {
2814 $res = '';
2815 if (isset($this->name)) {
2816 $res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
2818 if (isset($this->direction)) {
2819 $res .= $prefix . "direction: " . ($this->direction) . "\n";
2821 if (isset($this->mode)) {
2822 $res .= $prefix . "mode: " . ($this->mode) . "\n";
2824 return $res;
2828 namespace storage_onestore_v3 {
2829 class Index extends \google\net\ProtocolMessage {
2830 private $property = array();
2831 public function getEntityType() {
2832 if (!isset($this->entity_type)) {
2833 return '';
2835 return $this->entity_type;
2837 public function setEntityType($val) {
2838 $this->entity_type = $val;
2839 return $this;
2841 public function clearEntityType() {
2842 unset($this->entity_type);
2843 return $this;
2845 public function hasEntityType() {
2846 return isset($this->entity_type);
2848 public function getPropertySize() {
2849 return sizeof($this->property);
2851 public function getPropertyList() {
2852 return $this->property;
2854 public function mutableProperty($idx) {
2855 if (!isset($this->property[$idx])) {
2856 $val = new \storage_onestore_v3\Index\Property();
2857 $this->property[$idx] = $val;
2858 return $val;
2860 return $this->property[$idx];
2862 public function getProperty($idx) {
2863 if (isset($this->property[$idx])) {
2864 return $this->property[$idx];
2866 if ($idx >= end(array_keys($this->property))) {
2867 throw new \OutOfRangeException('index out of range: ' + $idx);
2869 return new \storage_onestore_v3\Index\Property();
2871 public function addProperty() {
2872 $val = new \storage_onestore_v3\Index\Property();
2873 $this->property[] = $val;
2874 return $val;
2876 public function clearProperty() {
2877 $this->property = array();
2879 public function getAncestor() {
2880 if (!isset($this->ancestor)) {
2881 return false;
2883 return $this->ancestor;
2885 public function setAncestor($val) {
2886 $this->ancestor = $val;
2887 return $this;
2889 public function clearAncestor() {
2890 unset($this->ancestor);
2891 return $this;
2893 public function hasAncestor() {
2894 return isset($this->ancestor);
2896 public function clear() {
2897 $this->clearEntityType();
2898 $this->clearProperty();
2899 $this->clearAncestor();
2901 public function byteSizePartial() {
2902 $res = 0;
2903 if (isset($this->entity_type)) {
2904 $res += 1;
2905 $res += $this->lengthString(strlen($this->entity_type));
2907 $this->checkProtoArray($this->property);
2908 $res += 2 * sizeof($this->property);
2909 foreach ($this->property as $value) {
2910 $res += $value->byteSizePartial();
2912 if (isset($this->ancestor)) {
2913 $res += 2;
2915 return $res;
2917 public function outputPartial($out) {
2918 if (isset($this->entity_type)) {
2919 $out->putVarInt32(10);
2920 $out->putPrefixedString($this->entity_type);
2922 $this->checkProtoArray($this->property);
2923 foreach ($this->property as $value) {
2924 $out->putVarInt32(19);
2925 $value->outputPartial($out);
2926 $out->putVarInt32(20);
2928 if (isset($this->ancestor)) {
2929 $out->putVarInt32(40);
2930 $out->putBoolean($this->ancestor);
2933 public function tryMerge($d) {
2934 while($d->avail() > 0) {
2935 $tt = $d->getVarInt32();
2936 switch ($tt) {
2937 case 10:
2938 $length = $d->getVarInt32();
2939 $this->setEntityType(substr($d->buffer(), $d->pos(), $length));
2940 $d->skip($length);
2941 break;
2942 case 19:
2943 $this->addProperty()->tryMerge($d);
2944 break;
2945 case 40:
2946 $this->setAncestor($d->getBoolean());
2947 break;
2948 case 0:
2949 throw new \google\net\ProtocolBufferDecodeError();
2950 break;
2951 default:
2952 $d->skipData($tt);
2956 public function checkInitialized() {
2957 if (!isset($this->entity_type)) return 'entity_type';
2958 foreach ($this->property as $value) {
2959 if (!$value->isInitialized()) return 'property';
2961 if (!isset($this->ancestor)) return 'ancestor';
2962 return null;
2964 public function mergeFrom($x) {
2965 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2966 if ($x->hasEntityType()) {
2967 $this->setEntityType($x->getEntityType());
2969 foreach ($x->getPropertyList() as $v) {
2970 $this->addProperty()->copyFrom($v);
2972 if ($x->hasAncestor()) {
2973 $this->setAncestor($x->getAncestor());
2976 public function equals($x) {
2977 if ($x === $this) { return true; }
2978 if (isset($this->entity_type) !== isset($x->entity_type)) return false;
2979 if (isset($this->entity_type) && $this->entity_type !== $x->entity_type) return false;
2980 if (sizeof($this->property) !== sizeof($x->property)) return false;
2981 foreach (array_map(null, $this->property, $x->property) as $v) {
2982 if (!$v[0]->equals($v[1])) return false;
2984 if (isset($this->ancestor) !== isset($x->ancestor)) return false;
2985 if (isset($this->ancestor) && $this->ancestor !== $x->ancestor) return false;
2986 return true;
2988 public function shortDebugString($prefix = "") {
2989 $res = '';
2990 if (isset($this->entity_type)) {
2991 $res .= $prefix . "entity_type: " . $this->debugFormatString($this->entity_type) . "\n";
2993 foreach ($this->property as $value) {
2994 $res .= $prefix . "Property {\n" . $value->shortDebugString($prefix . " ") . $prefix . "}\n";
2996 if (isset($this->ancestor)) {
2997 $res .= $prefix . "ancestor: " . $this->debugFormatBool($this->ancestor) . "\n";
2999 return $res;
3003 namespace storage_onestore_v3\CompositeIndex {
3004 class State {
3005 const WRITE_ONLY = 1;
3006 const READ_WRITE = 2;
3007 const DELETED = 3;
3008 const ERROR = 4;
3011 namespace storage_onestore_v3\CompositeIndex {
3012 class WorkflowState {
3013 const PENDING = 1;
3014 const ACTIVE = 2;
3015 const COMPLETED = 3;
3018 namespace storage_onestore_v3 {
3019 class CompositeIndex extends \google\net\ProtocolMessage {
3020 private $read_division_family = array();
3021 public function getAppId() {
3022 if (!isset($this->app_id)) {
3023 return '';
3025 return $this->app_id;
3027 public function setAppId($val) {
3028 $this->app_id = $val;
3029 return $this;
3031 public function clearAppId() {
3032 unset($this->app_id);
3033 return $this;
3035 public function hasAppId() {
3036 return isset($this->app_id);
3038 public function getId() {
3039 if (!isset($this->id)) {
3040 return "0";
3042 return $this->id;
3044 public function setId($val) {
3045 if (is_double($val)) {
3046 $this->id = sprintf('%0.0F', $val);
3047 } else {
3048 $this->id = $val;
3050 return $this;
3052 public function clearId() {
3053 unset($this->id);
3054 return $this;
3056 public function hasId() {
3057 return isset($this->id);
3059 public function getDefinition() {
3060 if (!isset($this->definition)) {
3061 return new \storage_onestore_v3\Index();
3063 return $this->definition;
3065 public function mutableDefinition() {
3066 if (!isset($this->definition)) {
3067 $res = new \storage_onestore_v3\Index();
3068 $this->definition = $res;
3069 return $res;
3071 return $this->definition;
3073 public function clearDefinition() {
3074 if (isset($this->definition)) {
3075 unset($this->definition);
3078 public function hasDefinition() {
3079 return isset($this->definition);
3081 public function getState() {
3082 if (!isset($this->state)) {
3083 return 1;
3085 return $this->state;
3087 public function setState($val) {
3088 $this->state = $val;
3089 return $this;
3091 public function clearState() {
3092 unset($this->state);
3093 return $this;
3095 public function hasState() {
3096 return isset($this->state);
3098 public function getOnlyUseIfRequired() {
3099 if (!isset($this->only_use_if_required)) {
3100 return false;
3102 return $this->only_use_if_required;
3104 public function setOnlyUseIfRequired($val) {
3105 $this->only_use_if_required = $val;
3106 return $this;
3108 public function clearOnlyUseIfRequired() {
3109 unset($this->only_use_if_required);
3110 return $this;
3112 public function hasOnlyUseIfRequired() {
3113 return isset($this->only_use_if_required);
3115 public function getReadDivisionFamilySize() {
3116 return sizeof($this->read_division_family);
3118 public function getReadDivisionFamilyList() {
3119 return $this->read_division_family;
3121 public function getReadDivisionFamily($idx) {
3122 return $this->read_division_family[$idx];
3124 public function setReadDivisionFamily($idx, $val) {
3125 $this->read_division_family[$idx] = $val;
3126 return $this;
3128 public function addReadDivisionFamily($val) {
3129 $this->read_division_family[] = $val;
3130 return $this;
3132 public function clearReadDivisionFamily() {
3133 $this->read_division_family = array();
3135 public function getWriteDivisionFamily() {
3136 if (!isset($this->write_division_family)) {
3137 return '';
3139 return $this->write_division_family;
3141 public function setWriteDivisionFamily($val) {
3142 $this->write_division_family = $val;
3143 return $this;
3145 public function clearWriteDivisionFamily() {
3146 unset($this->write_division_family);
3147 return $this;
3149 public function hasWriteDivisionFamily() {
3150 return isset($this->write_division_family);
3152 public function getDisabledIndex() {
3153 if (!isset($this->disabled_index)) {
3154 return false;
3156 return $this->disabled_index;
3158 public function setDisabledIndex($val) {
3159 $this->disabled_index = $val;
3160 return $this;
3162 public function clearDisabledIndex() {
3163 unset($this->disabled_index);
3164 return $this;
3166 public function hasDisabledIndex() {
3167 return isset($this->disabled_index);
3169 public function getWorkflowState() {
3170 if (!isset($this->workflow_state)) {
3171 return 1;
3173 return $this->workflow_state;
3175 public function setWorkflowState($val) {
3176 $this->workflow_state = $val;
3177 return $this;
3179 public function clearWorkflowState() {
3180 unset($this->workflow_state);
3181 return $this;
3183 public function hasWorkflowState() {
3184 return isset($this->workflow_state);
3186 public function getErrorMessage() {
3187 if (!isset($this->error_message)) {
3188 return '';
3190 return $this->error_message;
3192 public function setErrorMessage($val) {
3193 $this->error_message = $val;
3194 return $this;
3196 public function clearErrorMessage() {
3197 unset($this->error_message);
3198 return $this;
3200 public function hasErrorMessage() {
3201 return isset($this->error_message);
3203 public function clear() {
3204 $this->clearAppId();
3205 $this->clearId();
3206 $this->clearDefinition();
3207 $this->clearState();
3208 $this->clearOnlyUseIfRequired();
3209 $this->clearReadDivisionFamily();
3210 $this->clearWriteDivisionFamily();
3211 $this->clearDisabledIndex();
3212 $this->clearWorkflowState();
3213 $this->clearErrorMessage();
3215 public function byteSizePartial() {
3216 $res = 0;
3217 if (isset($this->app_id)) {
3218 $res += 1;
3219 $res += $this->lengthString(strlen($this->app_id));
3221 if (isset($this->id)) {
3222 $res += 1;
3223 $res += $this->lengthVarInt64($this->id);
3225 if (isset($this->definition)) {
3226 $res += 1;
3227 $res += $this->lengthString($this->definition->byteSizePartial());
3229 if (isset($this->state)) {
3230 $res += 1;
3231 $res += $this->lengthVarInt64($this->state);
3233 if (isset($this->only_use_if_required)) {
3234 $res += 2;
3236 $this->checkProtoArray($this->read_division_family);
3237 $res += 1 * sizeof($this->read_division_family);
3238 foreach ($this->read_division_family as $value) {
3239 $res += $this->lengthString(strlen($value));
3241 if (isset($this->write_division_family)) {
3242 $res += 1;
3243 $res += $this->lengthString(strlen($this->write_division_family));
3245 if (isset($this->disabled_index)) {
3246 $res += 2;
3248 if (isset($this->workflow_state)) {
3249 $res += 1;
3250 $res += $this->lengthVarInt64($this->workflow_state);
3252 if (isset($this->error_message)) {
3253 $res += 1;
3254 $res += $this->lengthString(strlen($this->error_message));
3256 return $res;
3258 public function outputPartial($out) {
3259 if (isset($this->app_id)) {
3260 $out->putVarInt32(10);
3261 $out->putPrefixedString($this->app_id);
3263 if (isset($this->id)) {
3264 $out->putVarInt32(16);
3265 $out->putVarInt64($this->id);
3267 if (isset($this->definition)) {
3268 $out->putVarInt32(26);
3269 $out->putVarInt32($this->definition->byteSizePartial());
3270 $this->definition->outputPartial($out);
3272 if (isset($this->state)) {
3273 $out->putVarInt32(32);
3274 $out->putVarInt32($this->state);
3276 if (isset($this->only_use_if_required)) {
3277 $out->putVarInt32(48);
3278 $out->putBoolean($this->only_use_if_required);
3280 $this->checkProtoArray($this->read_division_family);
3281 foreach ($this->read_division_family as $value) {
3282 $out->putVarInt32(58);
3283 $out->putPrefixedString($value);
3285 if (isset($this->write_division_family)) {
3286 $out->putVarInt32(66);
3287 $out->putPrefixedString($this->write_division_family);
3289 if (isset($this->disabled_index)) {
3290 $out->putVarInt32(72);
3291 $out->putBoolean($this->disabled_index);
3293 if (isset($this->workflow_state)) {
3294 $out->putVarInt32(80);
3295 $out->putVarInt32($this->workflow_state);
3297 if (isset($this->error_message)) {
3298 $out->putVarInt32(90);
3299 $out->putPrefixedString($this->error_message);
3302 public function tryMerge($d) {
3303 while($d->avail() > 0) {
3304 $tt = $d->getVarInt32();
3305 switch ($tt) {
3306 case 10:
3307 $length = $d->getVarInt32();
3308 $this->setAppId(substr($d->buffer(), $d->pos(), $length));
3309 $d->skip($length);
3310 break;
3311 case 16:
3312 $this->setId($d->getVarInt64());
3313 break;
3314 case 26:
3315 $length = $d->getVarInt32();
3316 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3317 $d->skip($length);
3318 $this->mutableDefinition()->tryMerge($tmp);
3319 break;
3320 case 32:
3321 $this->setState($d->getVarInt32());
3322 break;
3323 case 48:
3324 $this->setOnlyUseIfRequired($d->getBoolean());
3325 break;
3326 case 58:
3327 $length = $d->getVarInt32();
3328 $this->addReadDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3329 $d->skip($length);
3330 break;
3331 case 66:
3332 $length = $d->getVarInt32();
3333 $this->setWriteDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3334 $d->skip($length);
3335 break;
3336 case 72:
3337 $this->setDisabledIndex($d->getBoolean());
3338 break;
3339 case 80:
3340 $this->setWorkflowState($d->getVarInt32());
3341 break;
3342 case 90:
3343 $length = $d->getVarInt32();
3344 $this->setErrorMessage(substr($d->buffer(), $d->pos(), $length));
3345 $d->skip($length);
3346 break;
3347 case 0:
3348 throw new \google\net\ProtocolBufferDecodeError();
3349 break;
3350 default:
3351 $d->skipData($tt);
3355 public function checkInitialized() {
3356 if (!isset($this->app_id)) return 'app_id';
3357 if (!isset($this->id)) return 'id';
3358 if ((!isset($this->definition)) || (!$this->definition->isInitialized())) return 'definition';
3359 if (!isset($this->state)) return 'state';
3360 return null;
3362 public function mergeFrom($x) {
3363 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3364 if ($x->hasAppId()) {
3365 $this->setAppId($x->getAppId());
3367 if ($x->hasId()) {
3368 $this->setId($x->getId());
3370 if ($x->hasDefinition()) {
3371 $this->mutableDefinition()->mergeFrom($x->getDefinition());
3373 if ($x->hasState()) {
3374 $this->setState($x->getState());
3376 if ($x->hasOnlyUseIfRequired()) {
3377 $this->setOnlyUseIfRequired($x->getOnlyUseIfRequired());
3379 foreach ($x->getReadDivisionFamilyList() as $v) {
3380 $this->addReadDivisionFamily($v);
3382 if ($x->hasWriteDivisionFamily()) {
3383 $this->setWriteDivisionFamily($x->getWriteDivisionFamily());
3385 if ($x->hasDisabledIndex()) {
3386 $this->setDisabledIndex($x->getDisabledIndex());
3388 if ($x->hasWorkflowState()) {
3389 $this->setWorkflowState($x->getWorkflowState());
3391 if ($x->hasErrorMessage()) {
3392 $this->setErrorMessage($x->getErrorMessage());
3395 public function equals($x) {
3396 if ($x === $this) { return true; }
3397 if (isset($this->app_id) !== isset($x->app_id)) return false;
3398 if (isset($this->app_id) && $this->app_id !== $x->app_id) return false;
3399 if (isset($this->id) !== isset($x->id)) return false;
3400 if (isset($this->id) && !$this->integerEquals($this->id, $x->id)) return false;
3401 if (isset($this->definition) !== isset($x->definition)) return false;
3402 if (isset($this->definition) && !$this->definition->equals($x->definition)) return false;
3403 if (isset($this->state) !== isset($x->state)) return false;
3404 if (isset($this->state) && $this->state !== $x->state) return false;
3405 if (isset($this->only_use_if_required) !== isset($x->only_use_if_required)) return false;
3406 if (isset($this->only_use_if_required) && $this->only_use_if_required !== $x->only_use_if_required) return false;
3407 if (sizeof($this->read_division_family) !== sizeof($x->read_division_family)) return false;
3408 foreach (array_map(null, $this->read_division_family, $x->read_division_family) as $v) {
3409 if ($v[0] !== $v[1]) return false;
3411 if (isset($this->write_division_family) !== isset($x->write_division_family)) return false;
3412 if (isset($this->write_division_family) && $this->write_division_family !== $x->write_division_family) return false;
3413 if (isset($this->disabled_index) !== isset($x->disabled_index)) return false;
3414 if (isset($this->disabled_index) && $this->disabled_index !== $x->disabled_index) return false;
3415 if (isset($this->workflow_state) !== isset($x->workflow_state)) return false;
3416 if (isset($this->workflow_state) && $this->workflow_state !== $x->workflow_state) return false;
3417 if (isset($this->error_message) !== isset($x->error_message)) return false;
3418 if (isset($this->error_message) && $this->error_message !== $x->error_message) return false;
3419 return true;
3421 public function shortDebugString($prefix = "") {
3422 $res = '';
3423 if (isset($this->app_id)) {
3424 $res .= $prefix . "app_id: " . $this->debugFormatString($this->app_id) . "\n";
3426 if (isset($this->id)) {
3427 $res .= $prefix . "id: " . $this->debugFormatInt64($this->id) . "\n";
3429 if (isset($this->definition)) {
3430 $res .= $prefix . "definition <\n" . $this->definition->shortDebugString($prefix . " ") . $prefix . ">\n";
3432 if (isset($this->state)) {
3433 $res .= $prefix . "state: " . ($this->state) . "\n";
3435 if (isset($this->only_use_if_required)) {
3436 $res .= $prefix . "only_use_if_required: " . $this->debugFormatBool($this->only_use_if_required) . "\n";
3438 foreach ($this->read_division_family as $value) {
3439 $res .= $prefix . "read_division_family: " . $this->debugFormatString($value) . "\n";
3441 if (isset($this->write_division_family)) {
3442 $res .= $prefix . "write_division_family: " . $this->debugFormatString($this->write_division_family) . "\n";
3444 if (isset($this->disabled_index)) {
3445 $res .= $prefix . "disabled_index: " . $this->debugFormatBool($this->disabled_index) . "\n";
3447 if (isset($this->workflow_state)) {
3448 $res .= $prefix . "workflow_state: " . ($this->workflow_state) . "\n";
3450 if (isset($this->error_message)) {
3451 $res .= $prefix . "error_message: " . $this->debugFormatString($this->error_message) . "\n";
3453 return $res;
3457 namespace storage_onestore_v3 {
3458 class SearchIndexEntry extends \google\net\ProtocolMessage {
3459 private $division_family = array();
3460 public function getIndexId() {
3461 if (!isset($this->index_id)) {
3462 return "0";
3464 return $this->index_id;
3466 public function setIndexId($val) {
3467 if (is_double($val)) {
3468 $this->index_id = sprintf('%0.0F', $val);
3469 } else {
3470 $this->index_id = $val;
3472 return $this;
3474 public function clearIndexId() {
3475 unset($this->index_id);
3476 return $this;
3478 public function hasIndexId() {
3479 return isset($this->index_id);
3481 public function getDivisionFamilySize() {
3482 return sizeof($this->division_family);
3484 public function getDivisionFamilyList() {
3485 return $this->division_family;
3487 public function getDivisionFamily($idx) {
3488 return $this->division_family[$idx];
3490 public function setDivisionFamily($idx, $val) {
3491 $this->division_family[$idx] = $val;
3492 return $this;
3494 public function addDivisionFamily($val) {
3495 $this->division_family[] = $val;
3496 return $this;
3498 public function clearDivisionFamily() {
3499 $this->division_family = array();
3501 public function getFingerprint1999() {
3502 if (!isset($this->fingerprint_1999)) {
3503 return "0";
3505 return $this->fingerprint_1999;
3507 public function setFingerprint1999($val) {
3508 if (is_double($val)) {
3509 $this->fingerprint_1999 = sprintf('%0.0F', $val);
3510 } else {
3511 $this->fingerprint_1999 = $val;
3513 return $this;
3515 public function clearFingerprint1999() {
3516 unset($this->fingerprint_1999);
3517 return $this;
3519 public function hasFingerprint1999() {
3520 return isset($this->fingerprint_1999);
3522 public function getFingerprint2011() {
3523 if (!isset($this->fingerprint_2011)) {
3524 return "0";
3526 return $this->fingerprint_2011;
3528 public function setFingerprint2011($val) {
3529 if (is_double($val)) {
3530 $this->fingerprint_2011 = sprintf('%0.0F', $val);
3531 } else {
3532 $this->fingerprint_2011 = $val;
3534 return $this;
3536 public function clearFingerprint2011() {
3537 unset($this->fingerprint_2011);
3538 return $this;
3540 public function hasFingerprint2011() {
3541 return isset($this->fingerprint_2011);
3543 public function clear() {
3544 $this->clearIndexId();
3545 $this->clearDivisionFamily();
3546 $this->clearFingerprint1999();
3547 $this->clearFingerprint2011();
3549 public function byteSizePartial() {
3550 $res = 0;
3551 if (isset($this->index_id)) {
3552 $res += 1;
3553 $res += $this->lengthVarInt64($this->index_id);
3555 $this->checkProtoArray($this->division_family);
3556 $res += 1 * sizeof($this->division_family);
3557 foreach ($this->division_family as $value) {
3558 $res += $this->lengthString(strlen($value));
3560 if (isset($this->fingerprint_1999)) {
3561 $res += 9;
3563 if (isset($this->fingerprint_2011)) {
3564 $res += 9;
3566 return $res;
3568 public function outputPartial($out) {
3569 if (isset($this->index_id)) {
3570 $out->putVarInt32(8);
3571 $out->putVarInt64($this->index_id);
3573 $this->checkProtoArray($this->division_family);
3574 foreach ($this->division_family as $value) {
3575 $out->putVarInt32(18);
3576 $out->putPrefixedString($value);
3578 if (isset($this->fingerprint_1999)) {
3579 $out->putVarInt32(25);
3580 $out->put64($this->fingerprint_1999);
3582 if (isset($this->fingerprint_2011)) {
3583 $out->putVarInt32(33);
3584 $out->put64($this->fingerprint_2011);
3587 public function tryMerge($d) {
3588 while($d->avail() > 0) {
3589 $tt = $d->getVarInt32();
3590 switch ($tt) {
3591 case 8:
3592 $this->setIndexId($d->getVarInt64());
3593 break;
3594 case 18:
3595 $length = $d->getVarInt32();
3596 $this->addDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3597 $d->skip($length);
3598 break;
3599 case 25:
3600 $this->setFingerprint1999($d->getFixed64());
3601 break;
3602 case 33:
3603 $this->setFingerprint2011($d->getFixed64());
3604 break;
3605 case 0:
3606 throw new \google\net\ProtocolBufferDecodeError();
3607 break;
3608 default:
3609 $d->skipData($tt);
3613 public function checkInitialized() {
3614 if (!isset($this->index_id)) return 'index_id';
3615 return null;
3617 public function mergeFrom($x) {
3618 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3619 if ($x->hasIndexId()) {
3620 $this->setIndexId($x->getIndexId());
3622 foreach ($x->getDivisionFamilyList() as $v) {
3623 $this->addDivisionFamily($v);
3625 if ($x->hasFingerprint1999()) {
3626 $this->setFingerprint1999($x->getFingerprint1999());
3628 if ($x->hasFingerprint2011()) {
3629 $this->setFingerprint2011($x->getFingerprint2011());
3632 public function equals($x) {
3633 if ($x === $this) { return true; }
3634 if (isset($this->index_id) !== isset($x->index_id)) return false;
3635 if (isset($this->index_id) && !$this->integerEquals($this->index_id, $x->index_id)) return false;
3636 if (sizeof($this->division_family) !== sizeof($x->division_family)) return false;
3637 foreach (array_map(null, $this->division_family, $x->division_family) as $v) {
3638 if ($v[0] !== $v[1]) return false;
3640 if (isset($this->fingerprint_1999) !== isset($x->fingerprint_1999)) return false;
3641 if (isset($this->fingerprint_1999) && !$this->integerEquals($this->fingerprint_1999, $x->fingerprint_1999)) return false;
3642 if (isset($this->fingerprint_2011) !== isset($x->fingerprint_2011)) return false;
3643 if (isset($this->fingerprint_2011) && !$this->integerEquals($this->fingerprint_2011, $x->fingerprint_2011)) return false;
3644 return true;
3646 public function shortDebugString($prefix = "") {
3647 $res = '';
3648 if (isset($this->index_id)) {
3649 $res .= $prefix . "index_id: " . $this->debugFormatInt64($this->index_id) . "\n";
3651 foreach ($this->division_family as $value) {
3652 $res .= $prefix . "division_family: " . $this->debugFormatString($value) . "\n";
3654 if (isset($this->fingerprint_1999)) {
3655 $res .= $prefix . "fingerprint_1999: " . $this->debugFormatFixed64($this->fingerprint_1999) . "\n";
3657 if (isset($this->fingerprint_2011)) {
3658 $res .= $prefix . "fingerprint_2011: " . $this->debugFormatFixed64($this->fingerprint_2011) . "\n";
3660 return $res;
3664 namespace storage_onestore_v3 {
3665 class SearchIndexExternalId extends \google\net\ProtocolMessage {
3666 public function getIndexId() {
3667 if (!isset($this->index_id)) {
3668 return "0";
3670 return $this->index_id;
3672 public function setIndexId($val) {
3673 if (is_double($val)) {
3674 $this->index_id = sprintf('%0.0F', $val);
3675 } else {
3676 $this->index_id = $val;
3678 return $this;
3680 public function clearIndexId() {
3681 unset($this->index_id);
3682 return $this;
3684 public function hasIndexId() {
3685 return isset($this->index_id);
3687 public function getPrimaryKey() {
3688 if (!isset($this->primary_key)) {
3689 return new \storage_onestore_v3\Reference();
3691 return $this->primary_key;
3693 public function mutablePrimaryKey() {
3694 if (!isset($this->primary_key)) {
3695 $res = new \storage_onestore_v3\Reference();
3696 $this->primary_key = $res;
3697 return $res;
3699 return $this->primary_key;
3701 public function clearPrimaryKey() {
3702 if (isset($this->primary_key)) {
3703 unset($this->primary_key);
3706 public function hasPrimaryKey() {
3707 return isset($this->primary_key);
3709 public function clear() {
3710 $this->clearIndexId();
3711 $this->clearPrimaryKey();
3713 public function byteSizePartial() {
3714 $res = 0;
3715 if (isset($this->index_id)) {
3716 $res += 1;
3717 $res += $this->lengthVarInt64($this->index_id);
3719 if (isset($this->primary_key)) {
3720 $res += 1;
3721 $res += $this->lengthString($this->primary_key->byteSizePartial());
3723 return $res;
3725 public function outputPartial($out) {
3726 if (isset($this->index_id)) {
3727 $out->putVarInt32(8);
3728 $out->putVarInt64($this->index_id);
3730 if (isset($this->primary_key)) {
3731 $out->putVarInt32(18);
3732 $out->putVarInt32($this->primary_key->byteSizePartial());
3733 $this->primary_key->outputPartial($out);
3736 public function tryMerge($d) {
3737 while($d->avail() > 0) {
3738 $tt = $d->getVarInt32();
3739 switch ($tt) {
3740 case 8:
3741 $this->setIndexId($d->getVarInt64());
3742 break;
3743 case 18:
3744 $length = $d->getVarInt32();
3745 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3746 $d->skip($length);
3747 $this->mutablePrimaryKey()->tryMerge($tmp);
3748 break;
3749 case 0:
3750 throw new \google\net\ProtocolBufferDecodeError();
3751 break;
3752 default:
3753 $d->skipData($tt);
3757 public function checkInitialized() {
3758 if (!isset($this->index_id)) return 'index_id';
3759 if ((!isset($this->primary_key)) || (!$this->primary_key->isInitialized())) return 'primary_key';
3760 return null;
3762 public function mergeFrom($x) {
3763 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3764 if ($x->hasIndexId()) {
3765 $this->setIndexId($x->getIndexId());
3767 if ($x->hasPrimaryKey()) {
3768 $this->mutablePrimaryKey()->mergeFrom($x->getPrimaryKey());
3771 public function equals($x) {
3772 if ($x === $this) { return true; }
3773 if (isset($this->index_id) !== isset($x->index_id)) return false;
3774 if (isset($this->index_id) && !$this->integerEquals($this->index_id, $x->index_id)) return false;
3775 if (isset($this->primary_key) !== isset($x->primary_key)) return false;
3776 if (isset($this->primary_key) && !$this->primary_key->equals($x->primary_key)) return false;
3777 return true;
3779 public function shortDebugString($prefix = "") {
3780 $res = '';
3781 if (isset($this->index_id)) {
3782 $res .= $prefix . "index_id: " . $this->debugFormatInt64($this->index_id) . "\n";
3784 if (isset($this->primary_key)) {
3785 $res .= $prefix . "primary_key <\n" . $this->primary_key->shortDebugString($prefix . " ") . $prefix . ">\n";
3787 return $res;
3791 namespace storage_onestore_v3\IndexPostfix {
3792 class IndexValue extends \google\net\ProtocolMessage {
3793 public function getPropertyName() {
3794 if (!isset($this->property_name)) {
3795 return '';
3797 return $this->property_name;
3799 public function setPropertyName($val) {
3800 $this->property_name = $val;
3801 return $this;
3803 public function clearPropertyName() {
3804 unset($this->property_name);
3805 return $this;
3807 public function hasPropertyName() {
3808 return isset($this->property_name);
3810 public function getValue() {
3811 if (!isset($this->value)) {
3812 return new \storage_onestore_v3\PropertyValue();
3814 return $this->value;
3816 public function mutableValue() {
3817 if (!isset($this->value)) {
3818 $res = new \storage_onestore_v3\PropertyValue();
3819 $this->value = $res;
3820 return $res;
3822 return $this->value;
3824 public function clearValue() {
3825 if (isset($this->value)) {
3826 unset($this->value);
3829 public function hasValue() {
3830 return isset($this->value);
3832 public function clear() {
3833 $this->clearPropertyName();
3834 $this->clearValue();
3836 public function byteSizePartial() {
3837 $res = 0;
3838 if (isset($this->property_name)) {
3839 $res += 1;
3840 $res += $this->lengthString(strlen($this->property_name));
3842 if (isset($this->value)) {
3843 $res += 1;
3844 $res += $this->lengthString($this->value->byteSizePartial());
3846 return $res;
3848 public function outputPartial($out) {
3849 if (isset($this->property_name)) {
3850 $out->putVarInt32(10);
3851 $out->putPrefixedString($this->property_name);
3853 if (isset($this->value)) {
3854 $out->putVarInt32(18);
3855 $out->putVarInt32($this->value->byteSizePartial());
3856 $this->value->outputPartial($out);
3859 public function tryMerge($d) {
3860 while($d->avail() > 0) {
3861 $tt = $d->getVarInt32();
3862 switch ($tt) {
3863 case 10:
3864 $length = $d->getVarInt32();
3865 $this->setPropertyName(substr($d->buffer(), $d->pos(), $length));
3866 $d->skip($length);
3867 break;
3868 case 18:
3869 $length = $d->getVarInt32();
3870 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3871 $d->skip($length);
3872 $this->mutableValue()->tryMerge($tmp);
3873 break;
3874 case 0:
3875 throw new \google\net\ProtocolBufferDecodeError();
3876 break;
3877 default:
3878 $d->skipData($tt);
3882 public function checkInitialized() {
3883 if (!isset($this->property_name)) return 'property_name';
3884 if ((!isset($this->value)) || (!$this->value->isInitialized())) return 'value';
3885 return null;
3887 public function mergeFrom($x) {
3888 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3889 if ($x->hasPropertyName()) {
3890 $this->setPropertyName($x->getPropertyName());
3892 if ($x->hasValue()) {
3893 $this->mutableValue()->mergeFrom($x->getValue());
3896 public function equals($x) {
3897 if ($x === $this) { return true; }
3898 if (isset($this->property_name) !== isset($x->property_name)) return false;
3899 if (isset($this->property_name) && $this->property_name !== $x->property_name) return false;
3900 if (isset($this->value) !== isset($x->value)) return false;
3901 if (isset($this->value) && !$this->value->equals($x->value)) return false;
3902 return true;
3904 public function shortDebugString($prefix = "") {
3905 $res = '';
3906 if (isset($this->property_name)) {
3907 $res .= $prefix . "property_name: " . $this->debugFormatString($this->property_name) . "\n";
3909 if (isset($this->value)) {
3910 $res .= $prefix . "value <\n" . $this->value->shortDebugString($prefix . " ") . $prefix . ">\n";
3912 return $res;
3916 namespace storage_onestore_v3 {
3917 class IndexPostfix extends \google\net\ProtocolMessage {
3918 private $index_value = array();
3919 public function getIndexValueSize() {
3920 return sizeof($this->index_value);
3922 public function getIndexValueList() {
3923 return $this->index_value;
3925 public function mutableIndexValue($idx) {
3926 if (!isset($this->index_value[$idx])) {
3927 $val = new \storage_onestore_v3\IndexPostfix\IndexValue();
3928 $this->index_value[$idx] = $val;
3929 return $val;
3931 return $this->index_value[$idx];
3933 public function getIndexValue($idx) {
3934 if (isset($this->index_value[$idx])) {
3935 return $this->index_value[$idx];
3937 if ($idx >= end(array_keys($this->index_value))) {
3938 throw new \OutOfRangeException('index out of range: ' + $idx);
3940 return new \storage_onestore_v3\IndexPostfix\IndexValue();
3942 public function addIndexValue() {
3943 $val = new \storage_onestore_v3\IndexPostfix\IndexValue();
3944 $this->index_value[] = $val;
3945 return $val;
3947 public function clearIndexValue() {
3948 $this->index_value = array();
3950 public function getKey() {
3951 if (!isset($this->key)) {
3952 return new \storage_onestore_v3\Reference();
3954 return $this->key;
3956 public function mutableKey() {
3957 if (!isset($this->key)) {
3958 $res = new \storage_onestore_v3\Reference();
3959 $this->key = $res;
3960 return $res;
3962 return $this->key;
3964 public function clearKey() {
3965 if (isset($this->key)) {
3966 unset($this->key);
3969 public function hasKey() {
3970 return isset($this->key);
3972 public function getBefore() {
3973 if (!isset($this->before)) {
3974 return true;
3976 return $this->before;
3978 public function setBefore($val) {
3979 $this->before = $val;
3980 return $this;
3982 public function clearBefore() {
3983 unset($this->before);
3984 return $this;
3986 public function hasBefore() {
3987 return isset($this->before);
3989 public function getBeforeAscending() {
3990 if (!isset($this->before_ascending)) {
3991 return false;
3993 return $this->before_ascending;
3995 public function setBeforeAscending($val) {
3996 $this->before_ascending = $val;
3997 return $this;
3999 public function clearBeforeAscending() {
4000 unset($this->before_ascending);
4001 return $this;
4003 public function hasBeforeAscending() {
4004 return isset($this->before_ascending);
4006 public function clear() {
4007 $this->clearIndexValue();
4008 $this->clearKey();
4009 $this->clearBefore();
4010 $this->clearBeforeAscending();
4012 public function byteSizePartial() {
4013 $res = 0;
4014 $this->checkProtoArray($this->index_value);
4015 $res += 1 * sizeof($this->index_value);
4016 foreach ($this->index_value as $value) {
4017 $res += $this->lengthString($value->byteSizePartial());
4019 if (isset($this->key)) {
4020 $res += 1;
4021 $res += $this->lengthString($this->key->byteSizePartial());
4023 if (isset($this->before)) {
4024 $res += 2;
4026 if (isset($this->before_ascending)) {
4027 $res += 2;
4029 return $res;
4031 public function outputPartial($out) {
4032 $this->checkProtoArray($this->index_value);
4033 foreach ($this->index_value as $value) {
4034 $out->putVarInt32(10);
4035 $out->putVarInt32($value->byteSizePartial());
4036 $value->outputPartial($out);
4038 if (isset($this->key)) {
4039 $out->putVarInt32(18);
4040 $out->putVarInt32($this->key->byteSizePartial());
4041 $this->key->outputPartial($out);
4043 if (isset($this->before)) {
4044 $out->putVarInt32(24);
4045 $out->putBoolean($this->before);
4047 if (isset($this->before_ascending)) {
4048 $out->putVarInt32(32);
4049 $out->putBoolean($this->before_ascending);
4052 public function tryMerge($d) {
4053 while($d->avail() > 0) {
4054 $tt = $d->getVarInt32();
4055 switch ($tt) {
4056 case 10:
4057 $length = $d->getVarInt32();
4058 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
4059 $d->skip($length);
4060 $this->addIndexValue()->tryMerge($tmp);
4061 break;
4062 case 18:
4063 $length = $d->getVarInt32();
4064 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
4065 $d->skip($length);
4066 $this->mutableKey()->tryMerge($tmp);
4067 break;
4068 case 24:
4069 $this->setBefore($d->getBoolean());
4070 break;
4071 case 32:
4072 $this->setBeforeAscending($d->getBoolean());
4073 break;
4074 case 0:
4075 throw new \google\net\ProtocolBufferDecodeError();
4076 break;
4077 default:
4078 $d->skipData($tt);
4082 public function checkInitialized() {
4083 foreach ($this->index_value as $value) {
4084 if (!$value->isInitialized()) return 'index_value';
4086 if (isset($this->key) && (!$this->key->isInitialized())) return 'key';
4087 return null;
4089 public function mergeFrom($x) {
4090 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
4091 foreach ($x->getIndexValueList() as $v) {
4092 $this->addIndexValue()->copyFrom($v);
4094 if ($x->hasKey()) {
4095 $this->mutableKey()->mergeFrom($x->getKey());
4097 if ($x->hasBefore()) {
4098 $this->setBefore($x->getBefore());
4100 if ($x->hasBeforeAscending()) {
4101 $this->setBeforeAscending($x->getBeforeAscending());
4104 public function equals($x) {
4105 if ($x === $this) { return true; }
4106 if (sizeof($this->index_value) !== sizeof($x->index_value)) return false;
4107 foreach (array_map(null, $this->index_value, $x->index_value) as $v) {
4108 if (!$v[0]->equals($v[1])) return false;
4110 if (isset($this->key) !== isset($x->key)) return false;
4111 if (isset($this->key) && !$this->key->equals($x->key)) return false;
4112 if (isset($this->before) !== isset($x->before)) return false;
4113 if (isset($this->before) && $this->before !== $x->before) return false;
4114 if (isset($this->before_ascending) !== isset($x->before_ascending)) return false;
4115 if (isset($this->before_ascending) && $this->before_ascending !== $x->before_ascending) return false;
4116 return true;
4118 public function shortDebugString($prefix = "") {
4119 $res = '';
4120 foreach ($this->index_value as $value) {
4121 $res .= $prefix . "index_value <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4123 if (isset($this->key)) {
4124 $res .= $prefix . "key <\n" . $this->key->shortDebugString($prefix . " ") . $prefix . ">\n";
4126 if (isset($this->before)) {
4127 $res .= $prefix . "before: " . $this->debugFormatBool($this->before) . "\n";
4129 if (isset($this->before_ascending)) {
4130 $res .= $prefix . "before_ascending: " . $this->debugFormatBool($this->before_ascending) . "\n";
4132 return $res;
4136 namespace storage_onestore_v3 {
4137 class IndexPosition extends \google\net\ProtocolMessage {
4138 public function getKey() {
4139 if (!isset($this->key)) {
4140 return '';
4142 return $this->key;
4144 public function setKey($val) {
4145 $this->key = $val;
4146 return $this;
4148 public function clearKey() {
4149 unset($this->key);
4150 return $this;
4152 public function hasKey() {
4153 return isset($this->key);
4155 public function getBefore() {
4156 if (!isset($this->before)) {
4157 return true;
4159 return $this->before;
4161 public function setBefore($val) {
4162 $this->before = $val;
4163 return $this;
4165 public function clearBefore() {
4166 unset($this->before);
4167 return $this;
4169 public function hasBefore() {
4170 return isset($this->before);
4172 public function getBeforeAscending() {
4173 if (!isset($this->before_ascending)) {
4174 return false;
4176 return $this->before_ascending;
4178 public function setBeforeAscending($val) {
4179 $this->before_ascending = $val;
4180 return $this;
4182 public function clearBeforeAscending() {
4183 unset($this->before_ascending);
4184 return $this;
4186 public function hasBeforeAscending() {
4187 return isset($this->before_ascending);
4189 public function clear() {
4190 $this->clearKey();
4191 $this->clearBefore();
4192 $this->clearBeforeAscending();
4194 public function byteSizePartial() {
4195 $res = 0;
4196 if (isset($this->key)) {
4197 $res += 1;
4198 $res += $this->lengthString(strlen($this->key));
4200 if (isset($this->before)) {
4201 $res += 2;
4203 if (isset($this->before_ascending)) {
4204 $res += 2;
4206 return $res;
4208 public function outputPartial($out) {
4209 if (isset($this->key)) {
4210 $out->putVarInt32(10);
4211 $out->putPrefixedString($this->key);
4213 if (isset($this->before)) {
4214 $out->putVarInt32(16);
4215 $out->putBoolean($this->before);
4217 if (isset($this->before_ascending)) {
4218 $out->putVarInt32(24);
4219 $out->putBoolean($this->before_ascending);
4222 public function tryMerge($d) {
4223 while($d->avail() > 0) {
4224 $tt = $d->getVarInt32();
4225 switch ($tt) {
4226 case 10:
4227 $length = $d->getVarInt32();
4228 $this->setKey(substr($d->buffer(), $d->pos(), $length));
4229 $d->skip($length);
4230 break;
4231 case 16:
4232 $this->setBefore($d->getBoolean());
4233 break;
4234 case 24:
4235 $this->setBeforeAscending($d->getBoolean());
4236 break;
4237 case 0:
4238 throw new \google\net\ProtocolBufferDecodeError();
4239 break;
4240 default:
4241 $d->skipData($tt);
4245 public function checkInitialized() {
4246 return null;
4248 public function mergeFrom($x) {
4249 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
4250 if ($x->hasKey()) {
4251 $this->setKey($x->getKey());
4253 if ($x->hasBefore()) {
4254 $this->setBefore($x->getBefore());
4256 if ($x->hasBeforeAscending()) {
4257 $this->setBeforeAscending($x->getBeforeAscending());
4260 public function equals($x) {
4261 if ($x === $this) { return true; }
4262 if (isset($this->key) !== isset($x->key)) return false;
4263 if (isset($this->key) && $this->key !== $x->key) return false;
4264 if (isset($this->before) !== isset($x->before)) return false;
4265 if (isset($this->before) && $this->before !== $x->before) return false;
4266 if (isset($this->before_ascending) !== isset($x->before_ascending)) return false;
4267 if (isset($this->before_ascending) && $this->before_ascending !== $x->before_ascending) return false;
4268 return true;
4270 public function shortDebugString($prefix = "") {
4271 $res = '';
4272 if (isset($this->key)) {
4273 $res .= $prefix . "key: " . $this->debugFormatString($this->key) . "\n";
4275 if (isset($this->before)) {
4276 $res .= $prefix . "before: " . $this->debugFormatBool($this->before) . "\n";
4278 if (isset($this->before_ascending)) {
4279 $res .= $prefix . "before_ascending: " . $this->debugFormatBool($this->before_ascending) . "\n";
4281 return $res;