App Engine Python SDK version 1.9.13
[gae.git] / python / php / sdk / google / appengine / datastore / entity_pb.php
blob52d1c1822f9fb19b40788004971f0d2d5c30c1eb
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 SEGMENT = 2;
2673 const GEOSPATIAL = 3;
2676 namespace storage_onestore_v3\Index {
2677 class Property extends \google\net\ProtocolMessage {
2678 public function getName() {
2679 if (!isset($this->name)) {
2680 return '';
2682 return $this->name;
2684 public function setName($val) {
2685 $this->name = $val;
2686 return $this;
2688 public function clearName() {
2689 unset($this->name);
2690 return $this;
2692 public function hasName() {
2693 return isset($this->name);
2695 public function getDirection() {
2696 if (!isset($this->direction)) {
2697 return 0;
2699 return $this->direction;
2701 public function setDirection($val) {
2702 $this->direction = $val;
2703 return $this;
2705 public function clearDirection() {
2706 unset($this->direction);
2707 return $this;
2709 public function hasDirection() {
2710 return isset($this->direction);
2712 public function getMode() {
2713 if (!isset($this->mode)) {
2714 return 0;
2716 return $this->mode;
2718 public function setMode($val) {
2719 $this->mode = $val;
2720 return $this;
2722 public function clearMode() {
2723 unset($this->mode);
2724 return $this;
2726 public function hasMode() {
2727 return isset($this->mode);
2729 public function clear() {
2730 $this->clearName();
2731 $this->clearDirection();
2732 $this->clearMode();
2734 public function byteSizePartial() {
2735 $res = 0;
2736 if (isset($this->name)) {
2737 $res += 1;
2738 $res += $this->lengthString(strlen($this->name));
2740 if (isset($this->direction)) {
2741 $res += 1;
2742 $res += $this->lengthVarInt64($this->direction);
2744 if (isset($this->mode)) {
2745 $res += 1;
2746 $res += $this->lengthVarInt64($this->mode);
2748 return $res;
2750 public function outputPartial($out) {
2751 if (isset($this->name)) {
2752 $out->putVarInt32(26);
2753 $out->putPrefixedString($this->name);
2755 if (isset($this->direction)) {
2756 $out->putVarInt32(32);
2757 $out->putVarInt32($this->direction);
2759 if (isset($this->mode)) {
2760 $out->putVarInt32(48);
2761 $out->putVarInt32($this->mode);
2764 public function tryMerge($d) {
2765 while($d->avail() > 0) {
2766 $tt = $d->getVarInt32();
2767 switch ($tt) {
2768 case 20: return;
2769 case 26:
2770 $length = $d->getVarInt32();
2771 $this->setName(substr($d->buffer(), $d->pos(), $length));
2772 $d->skip($length);
2773 break;
2774 case 32:
2775 $this->setDirection($d->getVarInt32());
2776 break;
2777 case 48:
2778 $this->setMode($d->getVarInt32());
2779 break;
2780 case 0:
2781 throw new \google\net\ProtocolBufferDecodeError();
2782 break;
2783 default:
2784 $d->skipData($tt);
2788 public function checkInitialized() {
2789 if (!isset($this->name)) return 'name';
2790 return null;
2792 public function mergeFrom($x) {
2793 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2794 if ($x->hasName()) {
2795 $this->setName($x->getName());
2797 if ($x->hasDirection()) {
2798 $this->setDirection($x->getDirection());
2800 if ($x->hasMode()) {
2801 $this->setMode($x->getMode());
2804 public function equals($x) {
2805 if ($x === $this) { return true; }
2806 if (isset($this->name) !== isset($x->name)) return false;
2807 if (isset($this->name) && $this->name !== $x->name) return false;
2808 if (isset($this->direction) !== isset($x->direction)) return false;
2809 if (isset($this->direction) && $this->direction !== $x->direction) return false;
2810 if (isset($this->mode) !== isset($x->mode)) return false;
2811 if (isset($this->mode) && $this->mode !== $x->mode) return false;
2812 return true;
2814 public function shortDebugString($prefix = "") {
2815 $res = '';
2816 if (isset($this->name)) {
2817 $res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
2819 if (isset($this->direction)) {
2820 $res .= $prefix . "direction: " . ($this->direction) . "\n";
2822 if (isset($this->mode)) {
2823 $res .= $prefix . "mode: " . ($this->mode) . "\n";
2825 return $res;
2829 namespace storage_onestore_v3 {
2830 class Index extends \google\net\ProtocolMessage {
2831 private $property = array();
2832 public function getEntityType() {
2833 if (!isset($this->entity_type)) {
2834 return '';
2836 return $this->entity_type;
2838 public function setEntityType($val) {
2839 $this->entity_type = $val;
2840 return $this;
2842 public function clearEntityType() {
2843 unset($this->entity_type);
2844 return $this;
2846 public function hasEntityType() {
2847 return isset($this->entity_type);
2849 public function getPropertySize() {
2850 return sizeof($this->property);
2852 public function getPropertyList() {
2853 return $this->property;
2855 public function mutableProperty($idx) {
2856 if (!isset($this->property[$idx])) {
2857 $val = new \storage_onestore_v3\Index\Property();
2858 $this->property[$idx] = $val;
2859 return $val;
2861 return $this->property[$idx];
2863 public function getProperty($idx) {
2864 if (isset($this->property[$idx])) {
2865 return $this->property[$idx];
2867 if ($idx >= end(array_keys($this->property))) {
2868 throw new \OutOfRangeException('index out of range: ' + $idx);
2870 return new \storage_onestore_v3\Index\Property();
2872 public function addProperty() {
2873 $val = new \storage_onestore_v3\Index\Property();
2874 $this->property[] = $val;
2875 return $val;
2877 public function clearProperty() {
2878 $this->property = array();
2880 public function getAncestor() {
2881 if (!isset($this->ancestor)) {
2882 return false;
2884 return $this->ancestor;
2886 public function setAncestor($val) {
2887 $this->ancestor = $val;
2888 return $this;
2890 public function clearAncestor() {
2891 unset($this->ancestor);
2892 return $this;
2894 public function hasAncestor() {
2895 return isset($this->ancestor);
2897 public function clear() {
2898 $this->clearEntityType();
2899 $this->clearProperty();
2900 $this->clearAncestor();
2902 public function byteSizePartial() {
2903 $res = 0;
2904 if (isset($this->entity_type)) {
2905 $res += 1;
2906 $res += $this->lengthString(strlen($this->entity_type));
2908 $this->checkProtoArray($this->property);
2909 $res += 2 * sizeof($this->property);
2910 foreach ($this->property as $value) {
2911 $res += $value->byteSizePartial();
2913 if (isset($this->ancestor)) {
2914 $res += 2;
2916 return $res;
2918 public function outputPartial($out) {
2919 if (isset($this->entity_type)) {
2920 $out->putVarInt32(10);
2921 $out->putPrefixedString($this->entity_type);
2923 $this->checkProtoArray($this->property);
2924 foreach ($this->property as $value) {
2925 $out->putVarInt32(19);
2926 $value->outputPartial($out);
2927 $out->putVarInt32(20);
2929 if (isset($this->ancestor)) {
2930 $out->putVarInt32(40);
2931 $out->putBoolean($this->ancestor);
2934 public function tryMerge($d) {
2935 while($d->avail() > 0) {
2936 $tt = $d->getVarInt32();
2937 switch ($tt) {
2938 case 10:
2939 $length = $d->getVarInt32();
2940 $this->setEntityType(substr($d->buffer(), $d->pos(), $length));
2941 $d->skip($length);
2942 break;
2943 case 19:
2944 $this->addProperty()->tryMerge($d);
2945 break;
2946 case 40:
2947 $this->setAncestor($d->getBoolean());
2948 break;
2949 case 0:
2950 throw new \google\net\ProtocolBufferDecodeError();
2951 break;
2952 default:
2953 $d->skipData($tt);
2957 public function checkInitialized() {
2958 if (!isset($this->entity_type)) return 'entity_type';
2959 foreach ($this->property as $value) {
2960 if (!$value->isInitialized()) return 'property';
2962 if (!isset($this->ancestor)) return 'ancestor';
2963 return null;
2965 public function mergeFrom($x) {
2966 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
2967 if ($x->hasEntityType()) {
2968 $this->setEntityType($x->getEntityType());
2970 foreach ($x->getPropertyList() as $v) {
2971 $this->addProperty()->copyFrom($v);
2973 if ($x->hasAncestor()) {
2974 $this->setAncestor($x->getAncestor());
2977 public function equals($x) {
2978 if ($x === $this) { return true; }
2979 if (isset($this->entity_type) !== isset($x->entity_type)) return false;
2980 if (isset($this->entity_type) && $this->entity_type !== $x->entity_type) return false;
2981 if (sizeof($this->property) !== sizeof($x->property)) return false;
2982 foreach (array_map(null, $this->property, $x->property) as $v) {
2983 if (!$v[0]->equals($v[1])) return false;
2985 if (isset($this->ancestor) !== isset($x->ancestor)) return false;
2986 if (isset($this->ancestor) && $this->ancestor !== $x->ancestor) return false;
2987 return true;
2989 public function shortDebugString($prefix = "") {
2990 $res = '';
2991 if (isset($this->entity_type)) {
2992 $res .= $prefix . "entity_type: " . $this->debugFormatString($this->entity_type) . "\n";
2994 foreach ($this->property as $value) {
2995 $res .= $prefix . "Property {\n" . $value->shortDebugString($prefix . " ") . $prefix . "}\n";
2997 if (isset($this->ancestor)) {
2998 $res .= $prefix . "ancestor: " . $this->debugFormatBool($this->ancestor) . "\n";
3000 return $res;
3004 namespace storage_onestore_v3\CompositeIndex {
3005 class State {
3006 const WRITE_ONLY = 1;
3007 const READ_WRITE = 2;
3008 const DELETED = 3;
3009 const ERROR = 4;
3012 namespace storage_onestore_v3\CompositeIndex {
3013 class WorkflowState {
3014 const PENDING = 1;
3015 const ACTIVE = 2;
3016 const COMPLETED = 3;
3019 namespace storage_onestore_v3 {
3020 class CompositeIndex extends \google\net\ProtocolMessage {
3021 private $read_division_family = array();
3022 public function getAppId() {
3023 if (!isset($this->app_id)) {
3024 return '';
3026 return $this->app_id;
3028 public function setAppId($val) {
3029 $this->app_id = $val;
3030 return $this;
3032 public function clearAppId() {
3033 unset($this->app_id);
3034 return $this;
3036 public function hasAppId() {
3037 return isset($this->app_id);
3039 public function getId() {
3040 if (!isset($this->id)) {
3041 return "0";
3043 return $this->id;
3045 public function setId($val) {
3046 if (is_double($val)) {
3047 $this->id = sprintf('%0.0F', $val);
3048 } else {
3049 $this->id = $val;
3051 return $this;
3053 public function clearId() {
3054 unset($this->id);
3055 return $this;
3057 public function hasId() {
3058 return isset($this->id);
3060 public function getDefinition() {
3061 if (!isset($this->definition)) {
3062 return new \storage_onestore_v3\Index();
3064 return $this->definition;
3066 public function mutableDefinition() {
3067 if (!isset($this->definition)) {
3068 $res = new \storage_onestore_v3\Index();
3069 $this->definition = $res;
3070 return $res;
3072 return $this->definition;
3074 public function clearDefinition() {
3075 if (isset($this->definition)) {
3076 unset($this->definition);
3079 public function hasDefinition() {
3080 return isset($this->definition);
3082 public function getState() {
3083 if (!isset($this->state)) {
3084 return 1;
3086 return $this->state;
3088 public function setState($val) {
3089 $this->state = $val;
3090 return $this;
3092 public function clearState() {
3093 unset($this->state);
3094 return $this;
3096 public function hasState() {
3097 return isset($this->state);
3099 public function getOnlyUseIfRequired() {
3100 if (!isset($this->only_use_if_required)) {
3101 return false;
3103 return $this->only_use_if_required;
3105 public function setOnlyUseIfRequired($val) {
3106 $this->only_use_if_required = $val;
3107 return $this;
3109 public function clearOnlyUseIfRequired() {
3110 unset($this->only_use_if_required);
3111 return $this;
3113 public function hasOnlyUseIfRequired() {
3114 return isset($this->only_use_if_required);
3116 public function getReadDivisionFamilySize() {
3117 return sizeof($this->read_division_family);
3119 public function getReadDivisionFamilyList() {
3120 return $this->read_division_family;
3122 public function getReadDivisionFamily($idx) {
3123 return $this->read_division_family[$idx];
3125 public function setReadDivisionFamily($idx, $val) {
3126 $this->read_division_family[$idx] = $val;
3127 return $this;
3129 public function addReadDivisionFamily($val) {
3130 $this->read_division_family[] = $val;
3131 return $this;
3133 public function clearReadDivisionFamily() {
3134 $this->read_division_family = array();
3136 public function getWriteDivisionFamily() {
3137 if (!isset($this->write_division_family)) {
3138 return '';
3140 return $this->write_division_family;
3142 public function setWriteDivisionFamily($val) {
3143 $this->write_division_family = $val;
3144 return $this;
3146 public function clearWriteDivisionFamily() {
3147 unset($this->write_division_family);
3148 return $this;
3150 public function hasWriteDivisionFamily() {
3151 return isset($this->write_division_family);
3153 public function getDisabledIndex() {
3154 if (!isset($this->disabled_index)) {
3155 return false;
3157 return $this->disabled_index;
3159 public function setDisabledIndex($val) {
3160 $this->disabled_index = $val;
3161 return $this;
3163 public function clearDisabledIndex() {
3164 unset($this->disabled_index);
3165 return $this;
3167 public function hasDisabledIndex() {
3168 return isset($this->disabled_index);
3170 public function getWorkflowState() {
3171 if (!isset($this->workflow_state)) {
3172 return 1;
3174 return $this->workflow_state;
3176 public function setWorkflowState($val) {
3177 $this->workflow_state = $val;
3178 return $this;
3180 public function clearWorkflowState() {
3181 unset($this->workflow_state);
3182 return $this;
3184 public function hasWorkflowState() {
3185 return isset($this->workflow_state);
3187 public function getErrorMessage() {
3188 if (!isset($this->error_message)) {
3189 return '';
3191 return $this->error_message;
3193 public function setErrorMessage($val) {
3194 $this->error_message = $val;
3195 return $this;
3197 public function clearErrorMessage() {
3198 unset($this->error_message);
3199 return $this;
3201 public function hasErrorMessage() {
3202 return isset($this->error_message);
3204 public function clear() {
3205 $this->clearAppId();
3206 $this->clearId();
3207 $this->clearDefinition();
3208 $this->clearState();
3209 $this->clearOnlyUseIfRequired();
3210 $this->clearReadDivisionFamily();
3211 $this->clearWriteDivisionFamily();
3212 $this->clearDisabledIndex();
3213 $this->clearWorkflowState();
3214 $this->clearErrorMessage();
3216 public function byteSizePartial() {
3217 $res = 0;
3218 if (isset($this->app_id)) {
3219 $res += 1;
3220 $res += $this->lengthString(strlen($this->app_id));
3222 if (isset($this->id)) {
3223 $res += 1;
3224 $res += $this->lengthVarInt64($this->id);
3226 if (isset($this->definition)) {
3227 $res += 1;
3228 $res += $this->lengthString($this->definition->byteSizePartial());
3230 if (isset($this->state)) {
3231 $res += 1;
3232 $res += $this->lengthVarInt64($this->state);
3234 if (isset($this->only_use_if_required)) {
3235 $res += 2;
3237 $this->checkProtoArray($this->read_division_family);
3238 $res += 1 * sizeof($this->read_division_family);
3239 foreach ($this->read_division_family as $value) {
3240 $res += $this->lengthString(strlen($value));
3242 if (isset($this->write_division_family)) {
3243 $res += 1;
3244 $res += $this->lengthString(strlen($this->write_division_family));
3246 if (isset($this->disabled_index)) {
3247 $res += 2;
3249 if (isset($this->workflow_state)) {
3250 $res += 1;
3251 $res += $this->lengthVarInt64($this->workflow_state);
3253 if (isset($this->error_message)) {
3254 $res += 1;
3255 $res += $this->lengthString(strlen($this->error_message));
3257 return $res;
3259 public function outputPartial($out) {
3260 if (isset($this->app_id)) {
3261 $out->putVarInt32(10);
3262 $out->putPrefixedString($this->app_id);
3264 if (isset($this->id)) {
3265 $out->putVarInt32(16);
3266 $out->putVarInt64($this->id);
3268 if (isset($this->definition)) {
3269 $out->putVarInt32(26);
3270 $out->putVarInt32($this->definition->byteSizePartial());
3271 $this->definition->outputPartial($out);
3273 if (isset($this->state)) {
3274 $out->putVarInt32(32);
3275 $out->putVarInt32($this->state);
3277 if (isset($this->only_use_if_required)) {
3278 $out->putVarInt32(48);
3279 $out->putBoolean($this->only_use_if_required);
3281 $this->checkProtoArray($this->read_division_family);
3282 foreach ($this->read_division_family as $value) {
3283 $out->putVarInt32(58);
3284 $out->putPrefixedString($value);
3286 if (isset($this->write_division_family)) {
3287 $out->putVarInt32(66);
3288 $out->putPrefixedString($this->write_division_family);
3290 if (isset($this->disabled_index)) {
3291 $out->putVarInt32(72);
3292 $out->putBoolean($this->disabled_index);
3294 if (isset($this->workflow_state)) {
3295 $out->putVarInt32(80);
3296 $out->putVarInt32($this->workflow_state);
3298 if (isset($this->error_message)) {
3299 $out->putVarInt32(90);
3300 $out->putPrefixedString($this->error_message);
3303 public function tryMerge($d) {
3304 while($d->avail() > 0) {
3305 $tt = $d->getVarInt32();
3306 switch ($tt) {
3307 case 10:
3308 $length = $d->getVarInt32();
3309 $this->setAppId(substr($d->buffer(), $d->pos(), $length));
3310 $d->skip($length);
3311 break;
3312 case 16:
3313 $this->setId($d->getVarInt64());
3314 break;
3315 case 26:
3316 $length = $d->getVarInt32();
3317 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3318 $d->skip($length);
3319 $this->mutableDefinition()->tryMerge($tmp);
3320 break;
3321 case 32:
3322 $this->setState($d->getVarInt32());
3323 break;
3324 case 48:
3325 $this->setOnlyUseIfRequired($d->getBoolean());
3326 break;
3327 case 58:
3328 $length = $d->getVarInt32();
3329 $this->addReadDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3330 $d->skip($length);
3331 break;
3332 case 66:
3333 $length = $d->getVarInt32();
3334 $this->setWriteDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3335 $d->skip($length);
3336 break;
3337 case 72:
3338 $this->setDisabledIndex($d->getBoolean());
3339 break;
3340 case 80:
3341 $this->setWorkflowState($d->getVarInt32());
3342 break;
3343 case 90:
3344 $length = $d->getVarInt32();
3345 $this->setErrorMessage(substr($d->buffer(), $d->pos(), $length));
3346 $d->skip($length);
3347 break;
3348 case 0:
3349 throw new \google\net\ProtocolBufferDecodeError();
3350 break;
3351 default:
3352 $d->skipData($tt);
3356 public function checkInitialized() {
3357 if (!isset($this->app_id)) return 'app_id';
3358 if (!isset($this->id)) return 'id';
3359 if ((!isset($this->definition)) || (!$this->definition->isInitialized())) return 'definition';
3360 if (!isset($this->state)) return 'state';
3361 return null;
3363 public function mergeFrom($x) {
3364 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3365 if ($x->hasAppId()) {
3366 $this->setAppId($x->getAppId());
3368 if ($x->hasId()) {
3369 $this->setId($x->getId());
3371 if ($x->hasDefinition()) {
3372 $this->mutableDefinition()->mergeFrom($x->getDefinition());
3374 if ($x->hasState()) {
3375 $this->setState($x->getState());
3377 if ($x->hasOnlyUseIfRequired()) {
3378 $this->setOnlyUseIfRequired($x->getOnlyUseIfRequired());
3380 foreach ($x->getReadDivisionFamilyList() as $v) {
3381 $this->addReadDivisionFamily($v);
3383 if ($x->hasWriteDivisionFamily()) {
3384 $this->setWriteDivisionFamily($x->getWriteDivisionFamily());
3386 if ($x->hasDisabledIndex()) {
3387 $this->setDisabledIndex($x->getDisabledIndex());
3389 if ($x->hasWorkflowState()) {
3390 $this->setWorkflowState($x->getWorkflowState());
3392 if ($x->hasErrorMessage()) {
3393 $this->setErrorMessage($x->getErrorMessage());
3396 public function equals($x) {
3397 if ($x === $this) { return true; }
3398 if (isset($this->app_id) !== isset($x->app_id)) return false;
3399 if (isset($this->app_id) && $this->app_id !== $x->app_id) return false;
3400 if (isset($this->id) !== isset($x->id)) return false;
3401 if (isset($this->id) && !$this->integerEquals($this->id, $x->id)) return false;
3402 if (isset($this->definition) !== isset($x->definition)) return false;
3403 if (isset($this->definition) && !$this->definition->equals($x->definition)) return false;
3404 if (isset($this->state) !== isset($x->state)) return false;
3405 if (isset($this->state) && $this->state !== $x->state) return false;
3406 if (isset($this->only_use_if_required) !== isset($x->only_use_if_required)) return false;
3407 if (isset($this->only_use_if_required) && $this->only_use_if_required !== $x->only_use_if_required) return false;
3408 if (sizeof($this->read_division_family) !== sizeof($x->read_division_family)) return false;
3409 foreach (array_map(null, $this->read_division_family, $x->read_division_family) as $v) {
3410 if ($v[0] !== $v[1]) return false;
3412 if (isset($this->write_division_family) !== isset($x->write_division_family)) return false;
3413 if (isset($this->write_division_family) && $this->write_division_family !== $x->write_division_family) return false;
3414 if (isset($this->disabled_index) !== isset($x->disabled_index)) return false;
3415 if (isset($this->disabled_index) && $this->disabled_index !== $x->disabled_index) return false;
3416 if (isset($this->workflow_state) !== isset($x->workflow_state)) return false;
3417 if (isset($this->workflow_state) && $this->workflow_state !== $x->workflow_state) return false;
3418 if (isset($this->error_message) !== isset($x->error_message)) return false;
3419 if (isset($this->error_message) && $this->error_message !== $x->error_message) return false;
3420 return true;
3422 public function shortDebugString($prefix = "") {
3423 $res = '';
3424 if (isset($this->app_id)) {
3425 $res .= $prefix . "app_id: " . $this->debugFormatString($this->app_id) . "\n";
3427 if (isset($this->id)) {
3428 $res .= $prefix . "id: " . $this->debugFormatInt64($this->id) . "\n";
3430 if (isset($this->definition)) {
3431 $res .= $prefix . "definition <\n" . $this->definition->shortDebugString($prefix . " ") . $prefix . ">\n";
3433 if (isset($this->state)) {
3434 $res .= $prefix . "state: " . ($this->state) . "\n";
3436 if (isset($this->only_use_if_required)) {
3437 $res .= $prefix . "only_use_if_required: " . $this->debugFormatBool($this->only_use_if_required) . "\n";
3439 foreach ($this->read_division_family as $value) {
3440 $res .= $prefix . "read_division_family: " . $this->debugFormatString($value) . "\n";
3442 if (isset($this->write_division_family)) {
3443 $res .= $prefix . "write_division_family: " . $this->debugFormatString($this->write_division_family) . "\n";
3445 if (isset($this->disabled_index)) {
3446 $res .= $prefix . "disabled_index: " . $this->debugFormatBool($this->disabled_index) . "\n";
3448 if (isset($this->workflow_state)) {
3449 $res .= $prefix . "workflow_state: " . ($this->workflow_state) . "\n";
3451 if (isset($this->error_message)) {
3452 $res .= $prefix . "error_message: " . $this->debugFormatString($this->error_message) . "\n";
3454 return $res;
3458 namespace storage_onestore_v3 {
3459 class SearchIndexEntry extends \google\net\ProtocolMessage {
3460 private $division_family = array();
3461 public function getIndexId() {
3462 if (!isset($this->index_id)) {
3463 return "0";
3465 return $this->index_id;
3467 public function setIndexId($val) {
3468 if (is_double($val)) {
3469 $this->index_id = sprintf('%0.0F', $val);
3470 } else {
3471 $this->index_id = $val;
3473 return $this;
3475 public function clearIndexId() {
3476 unset($this->index_id);
3477 return $this;
3479 public function hasIndexId() {
3480 return isset($this->index_id);
3482 public function getDivisionFamilySize() {
3483 return sizeof($this->division_family);
3485 public function getDivisionFamilyList() {
3486 return $this->division_family;
3488 public function getDivisionFamily($idx) {
3489 return $this->division_family[$idx];
3491 public function setDivisionFamily($idx, $val) {
3492 $this->division_family[$idx] = $val;
3493 return $this;
3495 public function addDivisionFamily($val) {
3496 $this->division_family[] = $val;
3497 return $this;
3499 public function clearDivisionFamily() {
3500 $this->division_family = array();
3502 public function getFingerprint1999() {
3503 if (!isset($this->fingerprint_1999)) {
3504 return "0";
3506 return $this->fingerprint_1999;
3508 public function setFingerprint1999($val) {
3509 if (is_double($val)) {
3510 $this->fingerprint_1999 = sprintf('%0.0F', $val);
3511 } else {
3512 $this->fingerprint_1999 = $val;
3514 return $this;
3516 public function clearFingerprint1999() {
3517 unset($this->fingerprint_1999);
3518 return $this;
3520 public function hasFingerprint1999() {
3521 return isset($this->fingerprint_1999);
3523 public function getFingerprint2011() {
3524 if (!isset($this->fingerprint_2011)) {
3525 return "0";
3527 return $this->fingerprint_2011;
3529 public function setFingerprint2011($val) {
3530 if (is_double($val)) {
3531 $this->fingerprint_2011 = sprintf('%0.0F', $val);
3532 } else {
3533 $this->fingerprint_2011 = $val;
3535 return $this;
3537 public function clearFingerprint2011() {
3538 unset($this->fingerprint_2011);
3539 return $this;
3541 public function hasFingerprint2011() {
3542 return isset($this->fingerprint_2011);
3544 public function clear() {
3545 $this->clearIndexId();
3546 $this->clearDivisionFamily();
3547 $this->clearFingerprint1999();
3548 $this->clearFingerprint2011();
3550 public function byteSizePartial() {
3551 $res = 0;
3552 if (isset($this->index_id)) {
3553 $res += 1;
3554 $res += $this->lengthVarInt64($this->index_id);
3556 $this->checkProtoArray($this->division_family);
3557 $res += 1 * sizeof($this->division_family);
3558 foreach ($this->division_family as $value) {
3559 $res += $this->lengthString(strlen($value));
3561 if (isset($this->fingerprint_1999)) {
3562 $res += 9;
3564 if (isset($this->fingerprint_2011)) {
3565 $res += 9;
3567 return $res;
3569 public function outputPartial($out) {
3570 if (isset($this->index_id)) {
3571 $out->putVarInt32(8);
3572 $out->putVarInt64($this->index_id);
3574 $this->checkProtoArray($this->division_family);
3575 foreach ($this->division_family as $value) {
3576 $out->putVarInt32(18);
3577 $out->putPrefixedString($value);
3579 if (isset($this->fingerprint_1999)) {
3580 $out->putVarInt32(25);
3581 $out->put64($this->fingerprint_1999);
3583 if (isset($this->fingerprint_2011)) {
3584 $out->putVarInt32(33);
3585 $out->put64($this->fingerprint_2011);
3588 public function tryMerge($d) {
3589 while($d->avail() > 0) {
3590 $tt = $d->getVarInt32();
3591 switch ($tt) {
3592 case 8:
3593 $this->setIndexId($d->getVarInt64());
3594 break;
3595 case 18:
3596 $length = $d->getVarInt32();
3597 $this->addDivisionFamily(substr($d->buffer(), $d->pos(), $length));
3598 $d->skip($length);
3599 break;
3600 case 25:
3601 $this->setFingerprint1999($d->getFixed64());
3602 break;
3603 case 33:
3604 $this->setFingerprint2011($d->getFixed64());
3605 break;
3606 case 0:
3607 throw new \google\net\ProtocolBufferDecodeError();
3608 break;
3609 default:
3610 $d->skipData($tt);
3614 public function checkInitialized() {
3615 if (!isset($this->index_id)) return 'index_id';
3616 return null;
3618 public function mergeFrom($x) {
3619 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3620 if ($x->hasIndexId()) {
3621 $this->setIndexId($x->getIndexId());
3623 foreach ($x->getDivisionFamilyList() as $v) {
3624 $this->addDivisionFamily($v);
3626 if ($x->hasFingerprint1999()) {
3627 $this->setFingerprint1999($x->getFingerprint1999());
3629 if ($x->hasFingerprint2011()) {
3630 $this->setFingerprint2011($x->getFingerprint2011());
3633 public function equals($x) {
3634 if ($x === $this) { return true; }
3635 if (isset($this->index_id) !== isset($x->index_id)) return false;
3636 if (isset($this->index_id) && !$this->integerEquals($this->index_id, $x->index_id)) return false;
3637 if (sizeof($this->division_family) !== sizeof($x->division_family)) return false;
3638 foreach (array_map(null, $this->division_family, $x->division_family) as $v) {
3639 if ($v[0] !== $v[1]) return false;
3641 if (isset($this->fingerprint_1999) !== isset($x->fingerprint_1999)) return false;
3642 if (isset($this->fingerprint_1999) && !$this->integerEquals($this->fingerprint_1999, $x->fingerprint_1999)) return false;
3643 if (isset($this->fingerprint_2011) !== isset($x->fingerprint_2011)) return false;
3644 if (isset($this->fingerprint_2011) && !$this->integerEquals($this->fingerprint_2011, $x->fingerprint_2011)) return false;
3645 return true;
3647 public function shortDebugString($prefix = "") {
3648 $res = '';
3649 if (isset($this->index_id)) {
3650 $res .= $prefix . "index_id: " . $this->debugFormatInt64($this->index_id) . "\n";
3652 foreach ($this->division_family as $value) {
3653 $res .= $prefix . "division_family: " . $this->debugFormatString($value) . "\n";
3655 if (isset($this->fingerprint_1999)) {
3656 $res .= $prefix . "fingerprint_1999: " . $this->debugFormatFixed64($this->fingerprint_1999) . "\n";
3658 if (isset($this->fingerprint_2011)) {
3659 $res .= $prefix . "fingerprint_2011: " . $this->debugFormatFixed64($this->fingerprint_2011) . "\n";
3661 return $res;
3665 namespace storage_onestore_v3 {
3666 class SearchIndexExternalId extends \google\net\ProtocolMessage {
3667 public function getIndexId() {
3668 if (!isset($this->index_id)) {
3669 return "0";
3671 return $this->index_id;
3673 public function setIndexId($val) {
3674 if (is_double($val)) {
3675 $this->index_id = sprintf('%0.0F', $val);
3676 } else {
3677 $this->index_id = $val;
3679 return $this;
3681 public function clearIndexId() {
3682 unset($this->index_id);
3683 return $this;
3685 public function hasIndexId() {
3686 return isset($this->index_id);
3688 public function getPrimaryKey() {
3689 if (!isset($this->primary_key)) {
3690 return new \storage_onestore_v3\Reference();
3692 return $this->primary_key;
3694 public function mutablePrimaryKey() {
3695 if (!isset($this->primary_key)) {
3696 $res = new \storage_onestore_v3\Reference();
3697 $this->primary_key = $res;
3698 return $res;
3700 return $this->primary_key;
3702 public function clearPrimaryKey() {
3703 if (isset($this->primary_key)) {
3704 unset($this->primary_key);
3707 public function hasPrimaryKey() {
3708 return isset($this->primary_key);
3710 public function clear() {
3711 $this->clearIndexId();
3712 $this->clearPrimaryKey();
3714 public function byteSizePartial() {
3715 $res = 0;
3716 if (isset($this->index_id)) {
3717 $res += 1;
3718 $res += $this->lengthVarInt64($this->index_id);
3720 if (isset($this->primary_key)) {
3721 $res += 1;
3722 $res += $this->lengthString($this->primary_key->byteSizePartial());
3724 return $res;
3726 public function outputPartial($out) {
3727 if (isset($this->index_id)) {
3728 $out->putVarInt32(8);
3729 $out->putVarInt64($this->index_id);
3731 if (isset($this->primary_key)) {
3732 $out->putVarInt32(18);
3733 $out->putVarInt32($this->primary_key->byteSizePartial());
3734 $this->primary_key->outputPartial($out);
3737 public function tryMerge($d) {
3738 while($d->avail() > 0) {
3739 $tt = $d->getVarInt32();
3740 switch ($tt) {
3741 case 8:
3742 $this->setIndexId($d->getVarInt64());
3743 break;
3744 case 18:
3745 $length = $d->getVarInt32();
3746 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3747 $d->skip($length);
3748 $this->mutablePrimaryKey()->tryMerge($tmp);
3749 break;
3750 case 0:
3751 throw new \google\net\ProtocolBufferDecodeError();
3752 break;
3753 default:
3754 $d->skipData($tt);
3758 public function checkInitialized() {
3759 if (!isset($this->index_id)) return 'index_id';
3760 if ((!isset($this->primary_key)) || (!$this->primary_key->isInitialized())) return 'primary_key';
3761 return null;
3763 public function mergeFrom($x) {
3764 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3765 if ($x->hasIndexId()) {
3766 $this->setIndexId($x->getIndexId());
3768 if ($x->hasPrimaryKey()) {
3769 $this->mutablePrimaryKey()->mergeFrom($x->getPrimaryKey());
3772 public function equals($x) {
3773 if ($x === $this) { return true; }
3774 if (isset($this->index_id) !== isset($x->index_id)) return false;
3775 if (isset($this->index_id) && !$this->integerEquals($this->index_id, $x->index_id)) return false;
3776 if (isset($this->primary_key) !== isset($x->primary_key)) return false;
3777 if (isset($this->primary_key) && !$this->primary_key->equals($x->primary_key)) return false;
3778 return true;
3780 public function shortDebugString($prefix = "") {
3781 $res = '';
3782 if (isset($this->index_id)) {
3783 $res .= $prefix . "index_id: " . $this->debugFormatInt64($this->index_id) . "\n";
3785 if (isset($this->primary_key)) {
3786 $res .= $prefix . "primary_key <\n" . $this->primary_key->shortDebugString($prefix . " ") . $prefix . ">\n";
3788 return $res;
3792 namespace storage_onestore_v3\IndexPostfix {
3793 class IndexValue extends \google\net\ProtocolMessage {
3794 public function getPropertyName() {
3795 if (!isset($this->property_name)) {
3796 return '';
3798 return $this->property_name;
3800 public function setPropertyName($val) {
3801 $this->property_name = $val;
3802 return $this;
3804 public function clearPropertyName() {
3805 unset($this->property_name);
3806 return $this;
3808 public function hasPropertyName() {
3809 return isset($this->property_name);
3811 public function getValue() {
3812 if (!isset($this->value)) {
3813 return new \storage_onestore_v3\PropertyValue();
3815 return $this->value;
3817 public function mutableValue() {
3818 if (!isset($this->value)) {
3819 $res = new \storage_onestore_v3\PropertyValue();
3820 $this->value = $res;
3821 return $res;
3823 return $this->value;
3825 public function clearValue() {
3826 if (isset($this->value)) {
3827 unset($this->value);
3830 public function hasValue() {
3831 return isset($this->value);
3833 public function clear() {
3834 $this->clearPropertyName();
3835 $this->clearValue();
3837 public function byteSizePartial() {
3838 $res = 0;
3839 if (isset($this->property_name)) {
3840 $res += 1;
3841 $res += $this->lengthString(strlen($this->property_name));
3843 if (isset($this->value)) {
3844 $res += 1;
3845 $res += $this->lengthString($this->value->byteSizePartial());
3847 return $res;
3849 public function outputPartial($out) {
3850 if (isset($this->property_name)) {
3851 $out->putVarInt32(10);
3852 $out->putPrefixedString($this->property_name);
3854 if (isset($this->value)) {
3855 $out->putVarInt32(18);
3856 $out->putVarInt32($this->value->byteSizePartial());
3857 $this->value->outputPartial($out);
3860 public function tryMerge($d) {
3861 while($d->avail() > 0) {
3862 $tt = $d->getVarInt32();
3863 switch ($tt) {
3864 case 10:
3865 $length = $d->getVarInt32();
3866 $this->setPropertyName(substr($d->buffer(), $d->pos(), $length));
3867 $d->skip($length);
3868 break;
3869 case 18:
3870 $length = $d->getVarInt32();
3871 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
3872 $d->skip($length);
3873 $this->mutableValue()->tryMerge($tmp);
3874 break;
3875 case 0:
3876 throw new \google\net\ProtocolBufferDecodeError();
3877 break;
3878 default:
3879 $d->skipData($tt);
3883 public function checkInitialized() {
3884 if (!isset($this->property_name)) return 'property_name';
3885 if ((!isset($this->value)) || (!$this->value->isInitialized())) return 'value';
3886 return null;
3888 public function mergeFrom($x) {
3889 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
3890 if ($x->hasPropertyName()) {
3891 $this->setPropertyName($x->getPropertyName());
3893 if ($x->hasValue()) {
3894 $this->mutableValue()->mergeFrom($x->getValue());
3897 public function equals($x) {
3898 if ($x === $this) { return true; }
3899 if (isset($this->property_name) !== isset($x->property_name)) return false;
3900 if (isset($this->property_name) && $this->property_name !== $x->property_name) return false;
3901 if (isset($this->value) !== isset($x->value)) return false;
3902 if (isset($this->value) && !$this->value->equals($x->value)) return false;
3903 return true;
3905 public function shortDebugString($prefix = "") {
3906 $res = '';
3907 if (isset($this->property_name)) {
3908 $res .= $prefix . "property_name: " . $this->debugFormatString($this->property_name) . "\n";
3910 if (isset($this->value)) {
3911 $res .= $prefix . "value <\n" . $this->value->shortDebugString($prefix . " ") . $prefix . ">\n";
3913 return $res;
3917 namespace storage_onestore_v3 {
3918 class IndexPostfix extends \google\net\ProtocolMessage {
3919 private $index_value = array();
3920 public function getIndexValueSize() {
3921 return sizeof($this->index_value);
3923 public function getIndexValueList() {
3924 return $this->index_value;
3926 public function mutableIndexValue($idx) {
3927 if (!isset($this->index_value[$idx])) {
3928 $val = new \storage_onestore_v3\IndexPostfix\IndexValue();
3929 $this->index_value[$idx] = $val;
3930 return $val;
3932 return $this->index_value[$idx];
3934 public function getIndexValue($idx) {
3935 if (isset($this->index_value[$idx])) {
3936 return $this->index_value[$idx];
3938 if ($idx >= end(array_keys($this->index_value))) {
3939 throw new \OutOfRangeException('index out of range: ' + $idx);
3941 return new \storage_onestore_v3\IndexPostfix\IndexValue();
3943 public function addIndexValue() {
3944 $val = new \storage_onestore_v3\IndexPostfix\IndexValue();
3945 $this->index_value[] = $val;
3946 return $val;
3948 public function clearIndexValue() {
3949 $this->index_value = array();
3951 public function getKey() {
3952 if (!isset($this->key)) {
3953 return new \storage_onestore_v3\Reference();
3955 return $this->key;
3957 public function mutableKey() {
3958 if (!isset($this->key)) {
3959 $res = new \storage_onestore_v3\Reference();
3960 $this->key = $res;
3961 return $res;
3963 return $this->key;
3965 public function clearKey() {
3966 if (isset($this->key)) {
3967 unset($this->key);
3970 public function hasKey() {
3971 return isset($this->key);
3973 public function getBefore() {
3974 if (!isset($this->before)) {
3975 return true;
3977 return $this->before;
3979 public function setBefore($val) {
3980 $this->before = $val;
3981 return $this;
3983 public function clearBefore() {
3984 unset($this->before);
3985 return $this;
3987 public function hasBefore() {
3988 return isset($this->before);
3990 public function getBeforeAscending() {
3991 if (!isset($this->before_ascending)) {
3992 return false;
3994 return $this->before_ascending;
3996 public function setBeforeAscending($val) {
3997 $this->before_ascending = $val;
3998 return $this;
4000 public function clearBeforeAscending() {
4001 unset($this->before_ascending);
4002 return $this;
4004 public function hasBeforeAscending() {
4005 return isset($this->before_ascending);
4007 public function clear() {
4008 $this->clearIndexValue();
4009 $this->clearKey();
4010 $this->clearBefore();
4011 $this->clearBeforeAscending();
4013 public function byteSizePartial() {
4014 $res = 0;
4015 $this->checkProtoArray($this->index_value);
4016 $res += 1 * sizeof($this->index_value);
4017 foreach ($this->index_value as $value) {
4018 $res += $this->lengthString($value->byteSizePartial());
4020 if (isset($this->key)) {
4021 $res += 1;
4022 $res += $this->lengthString($this->key->byteSizePartial());
4024 if (isset($this->before)) {
4025 $res += 2;
4027 if (isset($this->before_ascending)) {
4028 $res += 2;
4030 return $res;
4032 public function outputPartial($out) {
4033 $this->checkProtoArray($this->index_value);
4034 foreach ($this->index_value as $value) {
4035 $out->putVarInt32(10);
4036 $out->putVarInt32($value->byteSizePartial());
4037 $value->outputPartial($out);
4039 if (isset($this->key)) {
4040 $out->putVarInt32(18);
4041 $out->putVarInt32($this->key->byteSizePartial());
4042 $this->key->outputPartial($out);
4044 if (isset($this->before)) {
4045 $out->putVarInt32(24);
4046 $out->putBoolean($this->before);
4048 if (isset($this->before_ascending)) {
4049 $out->putVarInt32(32);
4050 $out->putBoolean($this->before_ascending);
4053 public function tryMerge($d) {
4054 while($d->avail() > 0) {
4055 $tt = $d->getVarInt32();
4056 switch ($tt) {
4057 case 10:
4058 $length = $d->getVarInt32();
4059 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
4060 $d->skip($length);
4061 $this->addIndexValue()->tryMerge($tmp);
4062 break;
4063 case 18:
4064 $length = $d->getVarInt32();
4065 $tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
4066 $d->skip($length);
4067 $this->mutableKey()->tryMerge($tmp);
4068 break;
4069 case 24:
4070 $this->setBefore($d->getBoolean());
4071 break;
4072 case 32:
4073 $this->setBeforeAscending($d->getBoolean());
4074 break;
4075 case 0:
4076 throw new \google\net\ProtocolBufferDecodeError();
4077 break;
4078 default:
4079 $d->skipData($tt);
4083 public function checkInitialized() {
4084 foreach ($this->index_value as $value) {
4085 if (!$value->isInitialized()) return 'index_value';
4087 if (isset($this->key) && (!$this->key->isInitialized())) return 'key';
4088 return null;
4090 public function mergeFrom($x) {
4091 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
4092 foreach ($x->getIndexValueList() as $v) {
4093 $this->addIndexValue()->copyFrom($v);
4095 if ($x->hasKey()) {
4096 $this->mutableKey()->mergeFrom($x->getKey());
4098 if ($x->hasBefore()) {
4099 $this->setBefore($x->getBefore());
4101 if ($x->hasBeforeAscending()) {
4102 $this->setBeforeAscending($x->getBeforeAscending());
4105 public function equals($x) {
4106 if ($x === $this) { return true; }
4107 if (sizeof($this->index_value) !== sizeof($x->index_value)) return false;
4108 foreach (array_map(null, $this->index_value, $x->index_value) as $v) {
4109 if (!$v[0]->equals($v[1])) return false;
4111 if (isset($this->key) !== isset($x->key)) return false;
4112 if (isset($this->key) && !$this->key->equals($x->key)) return false;
4113 if (isset($this->before) !== isset($x->before)) return false;
4114 if (isset($this->before) && $this->before !== $x->before) return false;
4115 if (isset($this->before_ascending) !== isset($x->before_ascending)) return false;
4116 if (isset($this->before_ascending) && $this->before_ascending !== $x->before_ascending) return false;
4117 return true;
4119 public function shortDebugString($prefix = "") {
4120 $res = '';
4121 foreach ($this->index_value as $value) {
4122 $res .= $prefix . "index_value <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
4124 if (isset($this->key)) {
4125 $res .= $prefix . "key <\n" . $this->key->shortDebugString($prefix . " ") . $prefix . ">\n";
4127 if (isset($this->before)) {
4128 $res .= $prefix . "before: " . $this->debugFormatBool($this->before) . "\n";
4130 if (isset($this->before_ascending)) {
4131 $res .= $prefix . "before_ascending: " . $this->debugFormatBool($this->before_ascending) . "\n";
4133 return $res;
4137 namespace storage_onestore_v3 {
4138 class IndexPosition extends \google\net\ProtocolMessage {
4139 public function getKey() {
4140 if (!isset($this->key)) {
4141 return '';
4143 return $this->key;
4145 public function setKey($val) {
4146 $this->key = $val;
4147 return $this;
4149 public function clearKey() {
4150 unset($this->key);
4151 return $this;
4153 public function hasKey() {
4154 return isset($this->key);
4156 public function getBefore() {
4157 if (!isset($this->before)) {
4158 return true;
4160 return $this->before;
4162 public function setBefore($val) {
4163 $this->before = $val;
4164 return $this;
4166 public function clearBefore() {
4167 unset($this->before);
4168 return $this;
4170 public function hasBefore() {
4171 return isset($this->before);
4173 public function getBeforeAscending() {
4174 if (!isset($this->before_ascending)) {
4175 return false;
4177 return $this->before_ascending;
4179 public function setBeforeAscending($val) {
4180 $this->before_ascending = $val;
4181 return $this;
4183 public function clearBeforeAscending() {
4184 unset($this->before_ascending);
4185 return $this;
4187 public function hasBeforeAscending() {
4188 return isset($this->before_ascending);
4190 public function clear() {
4191 $this->clearKey();
4192 $this->clearBefore();
4193 $this->clearBeforeAscending();
4195 public function byteSizePartial() {
4196 $res = 0;
4197 if (isset($this->key)) {
4198 $res += 1;
4199 $res += $this->lengthString(strlen($this->key));
4201 if (isset($this->before)) {
4202 $res += 2;
4204 if (isset($this->before_ascending)) {
4205 $res += 2;
4207 return $res;
4209 public function outputPartial($out) {
4210 if (isset($this->key)) {
4211 $out->putVarInt32(10);
4212 $out->putPrefixedString($this->key);
4214 if (isset($this->before)) {
4215 $out->putVarInt32(16);
4216 $out->putBoolean($this->before);
4218 if (isset($this->before_ascending)) {
4219 $out->putVarInt32(24);
4220 $out->putBoolean($this->before_ascending);
4223 public function tryMerge($d) {
4224 while($d->avail() > 0) {
4225 $tt = $d->getVarInt32();
4226 switch ($tt) {
4227 case 10:
4228 $length = $d->getVarInt32();
4229 $this->setKey(substr($d->buffer(), $d->pos(), $length));
4230 $d->skip($length);
4231 break;
4232 case 16:
4233 $this->setBefore($d->getBoolean());
4234 break;
4235 case 24:
4236 $this->setBeforeAscending($d->getBoolean());
4237 break;
4238 case 0:
4239 throw new \google\net\ProtocolBufferDecodeError();
4240 break;
4241 default:
4242 $d->skipData($tt);
4246 public function checkInitialized() {
4247 return null;
4249 public function mergeFrom($x) {
4250 if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
4251 if ($x->hasKey()) {
4252 $this->setKey($x->getKey());
4254 if ($x->hasBefore()) {
4255 $this->setBefore($x->getBefore());
4257 if ($x->hasBeforeAscending()) {
4258 $this->setBeforeAscending($x->getBeforeAscending());
4261 public function equals($x) {
4262 if ($x === $this) { return true; }
4263 if (isset($this->key) !== isset($x->key)) return false;
4264 if (isset($this->key) && $this->key !== $x->key) return false;
4265 if (isset($this->before) !== isset($x->before)) return false;
4266 if (isset($this->before) && $this->before !== $x->before) return false;
4267 if (isset($this->before_ascending) !== isset($x->before_ascending)) return false;
4268 if (isset($this->before_ascending) && $this->before_ascending !== $x->before_ascending) return false;
4269 return true;
4271 public function shortDebugString($prefix = "") {
4272 $res = '';
4273 if (isset($this->key)) {
4274 $res .= $prefix . "key: " . $this->debugFormatString($this->key) . "\n";
4276 if (isset($this->before)) {
4277 $res .= $prefix . "before: " . $this->debugFormatBool($this->before) . "\n";
4279 if (isset($this->before_ascending)) {
4280 $res .= $prefix . "before_ascending: " . $this->debugFormatBool($this->before_ascending) . "\n";
4282 return $res;