blob: 303f391a8ce1bcc5c76159dd635c8ce4aafe783d [file] [log] [blame]
<?php
/**
* Copyright 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/appengine/datastore/datastore_v4.proto
namespace dummy {
require_once 'google/appengine/runtime/proto/ProtocolMessage.php';
require_once 'google/appengine/datastore/entity_v4_pb.php';
}
namespace google\appengine\datastore\v4\Error {
class ErrorCode {
const BAD_REQUEST = 1;
const CONCURRENT_TRANSACTION = 2;
const INTERNAL_ERROR = 3;
const NEED_INDEX = 4;
const TIMEOUT = 5;
const PERMISSION_DENIED = 6;
const BIGTABLE_ERROR = 7;
const COMMITTED_BUT_STILL_APPLYING = 8;
const CAPABILITY_DISABLED = 9;
const TRY_ALTERNATE_BACKEND = 10;
const SAFE_TIME_TOO_OLD = 11;
}
}
namespace google\appengine\datastore\v4 {
class Error extends \google\net\ProtocolMessage {
public function clear() {
}
public function byteSizePartial() {
$res = 0;
return $res;
}
public function outputPartial($out) {
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
}
public function equals($x) {
if ($x === $this) { return true; }
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
return $res;
}
}
}
namespace google\appengine\datastore\v4\EntityResult {
class ResultType {
const FULL = 1;
const PROJECTION = 2;
const KEY_ONLY = 3;
}
}
namespace google\appengine\datastore\v4 {
class EntityResult extends \google\net\ProtocolMessage {
public function getEntity() {
if (!isset($this->entity)) {
return new \google\appengine\datastore\v4\Entity();
}
return $this->entity;
}
public function mutableEntity() {
if (!isset($this->entity)) {
$res = new \google\appengine\datastore\v4\Entity();
$this->entity = $res;
return $res;
}
return $this->entity;
}
public function clearEntity() {
if (isset($this->entity)) {
unset($this->entity);
}
}
public function hasEntity() {
return isset($this->entity);
}
public function getVersion() {
if (!isset($this->version)) {
return "0";
}
return $this->version;
}
public function setVersion($val) {
if (is_double($val)) {
$this->version = sprintf('%0.0F', $val);
} else {
$this->version = $val;
}
return $this;
}
public function clearVersion() {
unset($this->version);
return $this;
}
public function hasVersion() {
return isset($this->version);
}
public function clear() {
$this->clearEntity();
$this->clearVersion();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->entity)) {
$res += 1;
$res += $this->lengthString($this->entity->byteSizePartial());
}
if (isset($this->version)) {
$res += 1;
$res += $this->lengthVarInt64($this->version);
}
return $res;
}
public function outputPartial($out) {
if (isset($this->entity)) {
$out->putVarInt32(10);
$out->putVarInt32($this->entity->byteSizePartial());
$this->entity->outputPartial($out);
}
if (isset($this->version)) {
$out->putVarInt32(16);
$out->putVarInt64($this->version);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableEntity()->tryMerge($tmp);
break;
case 16:
$this->setVersion($d->getVarInt64());
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if ((!isset($this->entity)) || (!$this->entity->isInitialized())) return 'entity';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasEntity()) {
$this->mutableEntity()->mergeFrom($x->getEntity());
}
if ($x->hasVersion()) {
$this->setVersion($x->getVersion());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->entity) !== isset($x->entity)) return false;
if (isset($this->entity) && !$this->entity->equals($x->entity)) return false;
if (isset($this->version) !== isset($x->version)) return false;
if (isset($this->version) && !$this->integerEquals($this->version, $x->version)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->entity)) {
$res .= $prefix . "entity <\n" . $this->entity->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->version)) {
$res .= $prefix . "version: " . $this->debugFormatInt64($this->version) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class Query extends \google\net\ProtocolMessage {
private $projection = array();
private $kind = array();
private $order = array();
private $group_by = array();
public function getProjectionSize() {
return sizeof($this->projection);
}
public function getProjectionList() {
return $this->projection;
}
public function mutableProjection($idx) {
if (!isset($this->projection[$idx])) {
$val = new \google\appengine\datastore\v4\PropertyExpression();
$this->projection[$idx] = $val;
return $val;
}
return $this->projection[$idx];
}
public function getProjection($idx) {
if (isset($this->projection[$idx])) {
return $this->projection[$idx];
}
if ($idx >= end(array_keys($this->projection))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\PropertyExpression();
}
public function addProjection() {
$val = new \google\appengine\datastore\v4\PropertyExpression();
$this->projection[] = $val;
return $val;
}
public function clearProjection() {
$this->projection = array();
}
public function getKindSize() {
return sizeof($this->kind);
}
public function getKindList() {
return $this->kind;
}
public function mutableKind($idx) {
if (!isset($this->kind[$idx])) {
$val = new \google\appengine\datastore\v4\KindExpression();
$this->kind[$idx] = $val;
return $val;
}
return $this->kind[$idx];
}
public function getKind($idx) {
if (isset($this->kind[$idx])) {
return $this->kind[$idx];
}
if ($idx >= end(array_keys($this->kind))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\KindExpression();
}
public function addKind() {
$val = new \google\appengine\datastore\v4\KindExpression();
$this->kind[] = $val;
return $val;
}
public function clearKind() {
$this->kind = array();
}
public function getFilter() {
if (!isset($this->filter)) {
return new \google\appengine\datastore\v4\Filter();
}
return $this->filter;
}
public function mutableFilter() {
if (!isset($this->filter)) {
$res = new \google\appengine\datastore\v4\Filter();
$this->filter = $res;
return $res;
}
return $this->filter;
}
public function clearFilter() {
if (isset($this->filter)) {
unset($this->filter);
}
}
public function hasFilter() {
return isset($this->filter);
}
public function getOrderSize() {
return sizeof($this->order);
}
public function getOrderList() {
return $this->order;
}
public function mutableOrder($idx) {
if (!isset($this->order[$idx])) {
$val = new \google\appengine\datastore\v4\PropertyOrder();
$this->order[$idx] = $val;
return $val;
}
return $this->order[$idx];
}
public function getOrder($idx) {
if (isset($this->order[$idx])) {
return $this->order[$idx];
}
if ($idx >= end(array_keys($this->order))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\PropertyOrder();
}
public function addOrder() {
$val = new \google\appengine\datastore\v4\PropertyOrder();
$this->order[] = $val;
return $val;
}
public function clearOrder() {
$this->order = array();
}
public function getGroupBySize() {
return sizeof($this->group_by);
}
public function getGroupByList() {
return $this->group_by;
}
public function mutableGroupBy($idx) {
if (!isset($this->group_by[$idx])) {
$val = new \google\appengine\datastore\v4\PropertyReference();
$this->group_by[$idx] = $val;
return $val;
}
return $this->group_by[$idx];
}
public function getGroupBy($idx) {
if (isset($this->group_by[$idx])) {
return $this->group_by[$idx];
}
if ($idx >= end(array_keys($this->group_by))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\PropertyReference();
}
public function addGroupBy() {
$val = new \google\appengine\datastore\v4\PropertyReference();
$this->group_by[] = $val;
return $val;
}
public function clearGroupBy() {
$this->group_by = array();
}
public function getStartCursor() {
if (!isset($this->start_cursor)) {
return '';
}
return $this->start_cursor;
}
public function setStartCursor($val) {
$this->start_cursor = $val;
return $this;
}
public function clearStartCursor() {
unset($this->start_cursor);
return $this;
}
public function hasStartCursor() {
return isset($this->start_cursor);
}
public function getEndCursor() {
if (!isset($this->end_cursor)) {
return '';
}
return $this->end_cursor;
}
public function setEndCursor($val) {
$this->end_cursor = $val;
return $this;
}
public function clearEndCursor() {
unset($this->end_cursor);
return $this;
}
public function hasEndCursor() {
return isset($this->end_cursor);
}
public function getOffset() {
if (!isset($this->offset)) {
return 0;
}
return $this->offset;
}
public function setOffset($val) {
$this->offset = $val;
return $this;
}
public function clearOffset() {
unset($this->offset);
return $this;
}
public function hasOffset() {
return isset($this->offset);
}
public function getLimit() {
if (!isset($this->limit)) {
return 0;
}
return $this->limit;
}
public function setLimit($val) {
$this->limit = $val;
return $this;
}
public function clearLimit() {
unset($this->limit);
return $this;
}
public function hasLimit() {
return isset($this->limit);
}
public function clear() {
$this->clearProjection();
$this->clearKind();
$this->clearFilter();
$this->clearOrder();
$this->clearGroupBy();
$this->clearStartCursor();
$this->clearEndCursor();
$this->clearOffset();
$this->clearLimit();
}
public function byteSizePartial() {
$res = 0;
$this->checkProtoArray($this->projection);
$res += 1 * sizeof($this->projection);
foreach ($this->projection as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
$this->checkProtoArray($this->kind);
$res += 1 * sizeof($this->kind);
foreach ($this->kind as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
if (isset($this->filter)) {
$res += 1;
$res += $this->lengthString($this->filter->byteSizePartial());
}
$this->checkProtoArray($this->order);
$res += 1 * sizeof($this->order);
foreach ($this->order as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
$this->checkProtoArray($this->group_by);
$res += 1 * sizeof($this->group_by);
foreach ($this->group_by as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
if (isset($this->start_cursor)) {
$res += 1;
$res += $this->lengthString(strlen($this->start_cursor));
}
if (isset($this->end_cursor)) {
$res += 1;
$res += $this->lengthString(strlen($this->end_cursor));
}
if (isset($this->offset)) {
$res += 1;
$res += $this->lengthVarInt64($this->offset);
}
if (isset($this->limit)) {
$res += 1;
$res += $this->lengthVarInt64($this->limit);
}
return $res;
}
public function outputPartial($out) {
$this->checkProtoArray($this->projection);
foreach ($this->projection as $value) {
$out->putVarInt32(18);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
$this->checkProtoArray($this->kind);
foreach ($this->kind as $value) {
$out->putVarInt32(26);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
if (isset($this->filter)) {
$out->putVarInt32(34);
$out->putVarInt32($this->filter->byteSizePartial());
$this->filter->outputPartial($out);
}
$this->checkProtoArray($this->order);
foreach ($this->order as $value) {
$out->putVarInt32(42);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
$this->checkProtoArray($this->group_by);
foreach ($this->group_by as $value) {
$out->putVarInt32(50);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
if (isset($this->start_cursor)) {
$out->putVarInt32(58);
$out->putPrefixedString($this->start_cursor);
}
if (isset($this->end_cursor)) {
$out->putVarInt32(66);
$out->putPrefixedString($this->end_cursor);
}
if (isset($this->offset)) {
$out->putVarInt32(80);
$out->putVarInt32($this->offset);
}
if (isset($this->limit)) {
$out->putVarInt32(88);
$out->putVarInt32($this->limit);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addProjection()->tryMerge($tmp);
break;
case 26:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addKind()->tryMerge($tmp);
break;
case 34:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableFilter()->tryMerge($tmp);
break;
case 42:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addOrder()->tryMerge($tmp);
break;
case 50:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addGroupBy()->tryMerge($tmp);
break;
case 58:
$length = $d->getVarInt32();
$this->setStartCursor(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 66:
$length = $d->getVarInt32();
$this->setEndCursor(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 80:
$this->setOffset($d->getVarInt32());
break;
case 88:
$this->setLimit($d->getVarInt32());
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
foreach ($this->projection as $value) {
if (!$value->isInitialized()) return 'projection';
}
foreach ($this->kind as $value) {
if (!$value->isInitialized()) return 'kind';
}
if (isset($this->filter) && (!$this->filter->isInitialized())) return 'filter';
foreach ($this->order as $value) {
if (!$value->isInitialized()) return 'order';
}
foreach ($this->group_by as $value) {
if (!$value->isInitialized()) return 'group_by';
}
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
foreach ($x->getProjectionList() as $v) {
$this->addProjection()->copyFrom($v);
}
foreach ($x->getKindList() as $v) {
$this->addKind()->copyFrom($v);
}
if ($x->hasFilter()) {
$this->mutableFilter()->mergeFrom($x->getFilter());
}
foreach ($x->getOrderList() as $v) {
$this->addOrder()->copyFrom($v);
}
foreach ($x->getGroupByList() as $v) {
$this->addGroupBy()->copyFrom($v);
}
if ($x->hasStartCursor()) {
$this->setStartCursor($x->getStartCursor());
}
if ($x->hasEndCursor()) {
$this->setEndCursor($x->getEndCursor());
}
if ($x->hasOffset()) {
$this->setOffset($x->getOffset());
}
if ($x->hasLimit()) {
$this->setLimit($x->getLimit());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (sizeof($this->projection) !== sizeof($x->projection)) return false;
foreach (array_map(null, $this->projection, $x->projection) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (sizeof($this->kind) !== sizeof($x->kind)) return false;
foreach (array_map(null, $this->kind, $x->kind) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (isset($this->filter) !== isset($x->filter)) return false;
if (isset($this->filter) && !$this->filter->equals($x->filter)) return false;
if (sizeof($this->order) !== sizeof($x->order)) return false;
foreach (array_map(null, $this->order, $x->order) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (sizeof($this->group_by) !== sizeof($x->group_by)) return false;
foreach (array_map(null, $this->group_by, $x->group_by) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (isset($this->start_cursor) !== isset($x->start_cursor)) return false;
if (isset($this->start_cursor) && $this->start_cursor !== $x->start_cursor) return false;
if (isset($this->end_cursor) !== isset($x->end_cursor)) return false;
if (isset($this->end_cursor) && $this->end_cursor !== $x->end_cursor) return false;
if (isset($this->offset) !== isset($x->offset)) return false;
if (isset($this->offset) && !$this->integerEquals($this->offset, $x->offset)) return false;
if (isset($this->limit) !== isset($x->limit)) return false;
if (isset($this->limit) && !$this->integerEquals($this->limit, $x->limit)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
foreach ($this->projection as $value) {
$res .= $prefix . "projection <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
foreach ($this->kind as $value) {
$res .= $prefix . "kind <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->filter)) {
$res .= $prefix . "filter <\n" . $this->filter->shortDebugString($prefix . " ") . $prefix . ">\n";
}
foreach ($this->order as $value) {
$res .= $prefix . "order <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
foreach ($this->group_by as $value) {
$res .= $prefix . "group_by <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->start_cursor)) {
$res .= $prefix . "start_cursor: " . $this->debugFormatString($this->start_cursor) . "\n";
}
if (isset($this->end_cursor)) {
$res .= $prefix . "end_cursor: " . $this->debugFormatString($this->end_cursor) . "\n";
}
if (isset($this->offset)) {
$res .= $prefix . "offset: " . $this->debugFormatInt32($this->offset) . "\n";
}
if (isset($this->limit)) {
$res .= $prefix . "limit: " . $this->debugFormatInt32($this->limit) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class KindExpression extends \google\net\ProtocolMessage {
public function getName() {
if (!isset($this->name)) {
return '';
}
return $this->name;
}
public function setName($val) {
$this->name = $val;
return $this;
}
public function clearName() {
unset($this->name);
return $this;
}
public function hasName() {
return isset($this->name);
}
public function clear() {
$this->clearName();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->name)) {
$res += 1;
$res += $this->lengthString(strlen($this->name));
}
return $res;
}
public function outputPartial($out) {
if (isset($this->name)) {
$out->putVarInt32(10);
$out->putPrefixedString($this->name);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$this->setName(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (!isset($this->name)) return 'name';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasName()) {
$this->setName($x->getName());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->name) !== isset($x->name)) return false;
if (isset($this->name) && $this->name !== $x->name) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->name)) {
$res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class PropertyReference extends \google\net\ProtocolMessage {
public function getName() {
if (!isset($this->name)) {
return '';
}
return $this->name;
}
public function setName($val) {
$this->name = $val;
return $this;
}
public function clearName() {
unset($this->name);
return $this;
}
public function hasName() {
return isset($this->name);
}
public function clear() {
$this->clearName();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->name)) {
$res += 1;
$res += $this->lengthString(strlen($this->name));
}
return $res;
}
public function outputPartial($out) {
if (isset($this->name)) {
$out->putVarInt32(18);
$out->putPrefixedString($this->name);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 18:
$length = $d->getVarInt32();
$this->setName(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (!isset($this->name)) return 'name';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasName()) {
$this->setName($x->getName());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->name) !== isset($x->name)) return false;
if (isset($this->name) && $this->name !== $x->name) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->name)) {
$res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\PropertyExpression {
class AggregationFunction {
const FIRST = 1;
}
}
namespace google\appengine\datastore\v4 {
class PropertyExpression extends \google\net\ProtocolMessage {
public function getProperty() {
if (!isset($this->property)) {
return new \google\appengine\datastore\v4\PropertyReference();
}
return $this->property;
}
public function mutableProperty() {
if (!isset($this->property)) {
$res = new \google\appengine\datastore\v4\PropertyReference();
$this->property = $res;
return $res;
}
return $this->property;
}
public function clearProperty() {
if (isset($this->property)) {
unset($this->property);
}
}
public function hasProperty() {
return isset($this->property);
}
public function getAggregationFunction() {
if (!isset($this->aggregation_function)) {
return 1;
}
return $this->aggregation_function;
}
public function setAggregationFunction($val) {
$this->aggregation_function = $val;
return $this;
}
public function clearAggregationFunction() {
unset($this->aggregation_function);
return $this;
}
public function hasAggregationFunction() {
return isset($this->aggregation_function);
}
public function clear() {
$this->clearProperty();
$this->clearAggregationFunction();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->property)) {
$res += 1;
$res += $this->lengthString($this->property->byteSizePartial());
}
if (isset($this->aggregation_function)) {
$res += 1;
$res += $this->lengthVarInt64($this->aggregation_function);
}
return $res;
}
public function outputPartial($out) {
if (isset($this->property)) {
$out->putVarInt32(10);
$out->putVarInt32($this->property->byteSizePartial());
$this->property->outputPartial($out);
}
if (isset($this->aggregation_function)) {
$out->putVarInt32(16);
$out->putVarInt32($this->aggregation_function);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableProperty()->tryMerge($tmp);
break;
case 16:
$this->setAggregationFunction($d->getVarInt32());
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if ((!isset($this->property)) || (!$this->property->isInitialized())) return 'property';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasProperty()) {
$this->mutableProperty()->mergeFrom($x->getProperty());
}
if ($x->hasAggregationFunction()) {
$this->setAggregationFunction($x->getAggregationFunction());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->property) !== isset($x->property)) return false;
if (isset($this->property) && !$this->property->equals($x->property)) return false;
if (isset($this->aggregation_function) !== isset($x->aggregation_function)) return false;
if (isset($this->aggregation_function) && $this->aggregation_function !== $x->aggregation_function) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->property)) {
$res .= $prefix . "property <\n" . $this->property->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->aggregation_function)) {
$res .= $prefix . "aggregation_function: " . ($this->aggregation_function) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\PropertyOrder {
class Direction {
const ASCENDING = 1;
const DESCENDING = 2;
}
}
namespace google\appengine\datastore\v4 {
class PropertyOrder extends \google\net\ProtocolMessage {
public function getProperty() {
if (!isset($this->property)) {
return new \google\appengine\datastore\v4\PropertyReference();
}
return $this->property;
}
public function mutableProperty() {
if (!isset($this->property)) {
$res = new \google\appengine\datastore\v4\PropertyReference();
$this->property = $res;
return $res;
}
return $this->property;
}
public function clearProperty() {
if (isset($this->property)) {
unset($this->property);
}
}
public function hasProperty() {
return isset($this->property);
}
public function getDirection() {
if (!isset($this->direction)) {
return 1;
}
return $this->direction;
}
public function setDirection($val) {
$this->direction = $val;
return $this;
}
public function clearDirection() {
unset($this->direction);
return $this;
}
public function hasDirection() {
return isset($this->direction);
}
public function clear() {
$this->clearProperty();
$this->clearDirection();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->property)) {
$res += 1;
$res += $this->lengthString($this->property->byteSizePartial());
}
if (isset($this->direction)) {
$res += 1;
$res += $this->lengthVarInt64($this->direction);
}
return $res;
}
public function outputPartial($out) {
if (isset($this->property)) {
$out->putVarInt32(10);
$out->putVarInt32($this->property->byteSizePartial());
$this->property->outputPartial($out);
}
if (isset($this->direction)) {
$out->putVarInt32(16);
$out->putVarInt32($this->direction);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableProperty()->tryMerge($tmp);
break;
case 16:
$this->setDirection($d->getVarInt32());
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if ((!isset($this->property)) || (!$this->property->isInitialized())) return 'property';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasProperty()) {
$this->mutableProperty()->mergeFrom($x->getProperty());
}
if ($x->hasDirection()) {
$this->setDirection($x->getDirection());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->property) !== isset($x->property)) return false;
if (isset($this->property) && !$this->property->equals($x->property)) return false;
if (isset($this->direction) !== isset($x->direction)) return false;
if (isset($this->direction) && $this->direction !== $x->direction) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->property)) {
$res .= $prefix . "property <\n" . $this->property->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->direction)) {
$res .= $prefix . "direction: " . ($this->direction) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class Filter extends \google\net\ProtocolMessage {
public function getCompositeFilter() {
if (!isset($this->composite_filter)) {
return new \google\appengine\datastore\v4\CompositeFilter();
}
return $this->composite_filter;
}
public function mutableCompositeFilter() {
if (!isset($this->composite_filter)) {
$res = new \google\appengine\datastore\v4\CompositeFilter();
$this->composite_filter = $res;
return $res;
}
return $this->composite_filter;
}
public function clearCompositeFilter() {
if (isset($this->composite_filter)) {
unset($this->composite_filter);
}
}
public function hasCompositeFilter() {
return isset($this->composite_filter);
}
public function getPropertyFilter() {
if (!isset($this->property_filter)) {
return new \google\appengine\datastore\v4\PropertyFilter();
}
return $this->property_filter;
}
public function mutablePropertyFilter() {
if (!isset($this->property_filter)) {
$res = new \google\appengine\datastore\v4\PropertyFilter();
$this->property_filter = $res;
return $res;
}
return $this->property_filter;
}
public function clearPropertyFilter() {
if (isset($this->property_filter)) {
unset($this->property_filter);
}
}
public function hasPropertyFilter() {
return isset($this->property_filter);
}
public function clear() {
$this->clearCompositeFilter();
$this->clearPropertyFilter();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->composite_filter)) {
$res += 1;
$res += $this->lengthString($this->composite_filter->byteSizePartial());
}
if (isset($this->property_filter)) {
$res += 1;
$res += $this->lengthString($this->property_filter->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
if (isset($this->composite_filter)) {
$out->putVarInt32(10);
$out->putVarInt32($this->composite_filter->byteSizePartial());
$this->composite_filter->outputPartial($out);
}
if (isset($this->property_filter)) {
$out->putVarInt32(18);
$out->putVarInt32($this->property_filter->byteSizePartial());
$this->property_filter->outputPartial($out);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableCompositeFilter()->tryMerge($tmp);
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutablePropertyFilter()->tryMerge($tmp);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (isset($this->composite_filter) && (!$this->composite_filter->isInitialized())) return 'composite_filter';
if (isset($this->property_filter) && (!$this->property_filter->isInitialized())) return 'property_filter';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasCompositeFilter()) {
$this->mutableCompositeFilter()->mergeFrom($x->getCompositeFilter());
}
if ($x->hasPropertyFilter()) {
$this->mutablePropertyFilter()->mergeFrom($x->getPropertyFilter());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->composite_filter) !== isset($x->composite_filter)) return false;
if (isset($this->composite_filter) && !$this->composite_filter->equals($x->composite_filter)) return false;
if (isset($this->property_filter) !== isset($x->property_filter)) return false;
if (isset($this->property_filter) && !$this->property_filter->equals($x->property_filter)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->composite_filter)) {
$res .= $prefix . "composite_filter <\n" . $this->composite_filter->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->property_filter)) {
$res .= $prefix . "property_filter <\n" . $this->property_filter->shortDebugString($prefix . " ") . $prefix . ">\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\CompositeFilter {
class Operator {
const AND_ = 1;
}
}
namespace google\appengine\datastore\v4 {
class CompositeFilter extends \google\net\ProtocolMessage {
private $filter = array();
public function getOperator() {
if (!isset($this->operator)) {
return 1;
}
return $this->operator;
}
public function setOperator($val) {
$this->operator = $val;
return $this;
}
public function clearOperator() {
unset($this->operator);
return $this;
}
public function hasOperator() {
return isset($this->operator);
}
public function getFilterSize() {
return sizeof($this->filter);
}
public function getFilterList() {
return $this->filter;
}
public function mutableFilter($idx) {
if (!isset($this->filter[$idx])) {
$val = new \google\appengine\datastore\v4\Filter();
$this->filter[$idx] = $val;
return $val;
}
return $this->filter[$idx];
}
public function getFilter($idx) {
if (isset($this->filter[$idx])) {
return $this->filter[$idx];
}
if ($idx >= end(array_keys($this->filter))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\Filter();
}
public function addFilter() {
$val = new \google\appengine\datastore\v4\Filter();
$this->filter[] = $val;
return $val;
}
public function clearFilter() {
$this->filter = array();
}
public function clear() {
$this->clearOperator();
$this->clearFilter();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->operator)) {
$res += 1;
$res += $this->lengthVarInt64($this->operator);
}
$this->checkProtoArray($this->filter);
$res += 1 * sizeof($this->filter);
foreach ($this->filter as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
if (isset($this->operator)) {
$out->putVarInt32(8);
$out->putVarInt32($this->operator);
}
$this->checkProtoArray($this->filter);
foreach ($this->filter as $value) {
$out->putVarInt32(18);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 8:
$this->setOperator($d->getVarInt32());
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addFilter()->tryMerge($tmp);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (!isset($this->operator)) return 'operator';
foreach ($this->filter as $value) {
if (!$value->isInitialized()) return 'filter';
}
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasOperator()) {
$this->setOperator($x->getOperator());
}
foreach ($x->getFilterList() as $v) {
$this->addFilter()->copyFrom($v);
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->operator) !== isset($x->operator)) return false;
if (isset($this->operator) && $this->operator !== $x->operator) return false;
if (sizeof($this->filter) !== sizeof($x->filter)) return false;
foreach (array_map(null, $this->filter, $x->filter) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->operator)) {
$res .= $prefix . "operator: " . ($this->operator) . "\n";
}
foreach ($this->filter as $value) {
$res .= $prefix . "filter <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\PropertyFilter {
class Operator {
const LESS_THAN = 1;
const LESS_THAN_OR_EQUAL = 2;
const GREATER_THAN = 3;
const GREATER_THAN_OR_EQUAL = 4;
const EQUAL = 5;
const HAS_ANCESTOR = 11;
}
}
namespace google\appengine\datastore\v4 {
class PropertyFilter extends \google\net\ProtocolMessage {
public function getProperty() {
if (!isset($this->property)) {
return new \google\appengine\datastore\v4\PropertyReference();
}
return $this->property;
}
public function mutableProperty() {
if (!isset($this->property)) {
$res = new \google\appengine\datastore\v4\PropertyReference();
$this->property = $res;
return $res;
}
return $this->property;
}
public function clearProperty() {
if (isset($this->property)) {
unset($this->property);
}
}
public function hasProperty() {
return isset($this->property);
}
public function getOperator() {
if (!isset($this->operator)) {
return 1;
}
return $this->operator;
}
public function setOperator($val) {
$this->operator = $val;
return $this;
}
public function clearOperator() {
unset($this->operator);
return $this;
}
public function hasOperator() {
return isset($this->operator);
}
public function getValue() {
if (!isset($this->value)) {
return new \google\appengine\datastore\v4\Value();
}
return $this->value;
}
public function mutableValue() {
if (!isset($this->value)) {
$res = new \google\appengine\datastore\v4\Value();
$this->value = $res;
return $res;
}
return $this->value;
}
public function clearValue() {
if (isset($this->value)) {
unset($this->value);
}
}
public function hasValue() {
return isset($this->value);
}
public function clear() {
$this->clearProperty();
$this->clearOperator();
$this->clearValue();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->property)) {
$res += 1;
$res += $this->lengthString($this->property->byteSizePartial());
}
if (isset($this->operator)) {
$res += 1;
$res += $this->lengthVarInt64($this->operator);
}
if (isset($this->value)) {
$res += 1;
$res += $this->lengthString($this->value->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
if (isset($this->property)) {
$out->putVarInt32(10);
$out->putVarInt32($this->property->byteSizePartial());
$this->property->outputPartial($out);
}
if (isset($this->operator)) {
$out->putVarInt32(16);
$out->putVarInt32($this->operator);
}
if (isset($this->value)) {
$out->putVarInt32(26);
$out->putVarInt32($this->value->byteSizePartial());
$this->value->outputPartial($out);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableProperty()->tryMerge($tmp);
break;
case 16:
$this->setOperator($d->getVarInt32());
break;
case 26:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableValue()->tryMerge($tmp);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if ((!isset($this->property)) || (!$this->property->isInitialized())) return 'property';
if (!isset($this->operator)) return 'operator';
if ((!isset($this->value)) || (!$this->value->isInitialized())) return 'value';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasProperty()) {
$this->mutableProperty()->mergeFrom($x->getProperty());
}
if ($x->hasOperator()) {
$this->setOperator($x->getOperator());
}
if ($x->hasValue()) {
$this->mutableValue()->mergeFrom($x->getValue());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->property) !== isset($x->property)) return false;
if (isset($this->property) && !$this->property->equals($x->property)) return false;
if (isset($this->operator) !== isset($x->operator)) return false;
if (isset($this->operator) && $this->operator !== $x->operator) return false;
if (isset($this->value) !== isset($x->value)) return false;
if (isset($this->value) && !$this->value->equals($x->value)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->property)) {
$res .= $prefix . "property <\n" . $this->property->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->operator)) {
$res .= $prefix . "operator: " . ($this->operator) . "\n";
}
if (isset($this->value)) {
$res .= $prefix . "value <\n" . $this->value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class GqlQuery extends \google\net\ProtocolMessage {
private $name_arg = array();
private $number_arg = array();
public function getQueryString() {
if (!isset($this->query_string)) {
return '';
}
return $this->query_string;
}
public function setQueryString($val) {
$this->query_string = $val;
return $this;
}
public function clearQueryString() {
unset($this->query_string);
return $this;
}
public function hasQueryString() {
return isset($this->query_string);
}
public function getAllowLiteral() {
if (!isset($this->allow_literal)) {
return false;
}
return $this->allow_literal;
}
public function setAllowLiteral($val) {
$this->allow_literal = $val;
return $this;
}
public function clearAllowLiteral() {
unset($this->allow_literal);
return $this;
}
public function hasAllowLiteral() {
return isset($this->allow_literal);
}
public function getNameArgSize() {
return sizeof($this->name_arg);
}
public function getNameArgList() {
return $this->name_arg;
}
public function mutableNameArg($idx) {
if (!isset($this->name_arg[$idx])) {
$val = new \google\appengine\datastore\v4\GqlQueryArg();
$this->name_arg[$idx] = $val;
return $val;
}
return $this->name_arg[$idx];
}
public function getNameArg($idx) {
if (isset($this->name_arg[$idx])) {
return $this->name_arg[$idx];
}
if ($idx >= end(array_keys($this->name_arg))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\GqlQueryArg();
}
public function addNameArg() {
$val = new \google\appengine\datastore\v4\GqlQueryArg();
$this->name_arg[] = $val;
return $val;
}
public function clearNameArg() {
$this->name_arg = array();
}
public function getNumberArgSize() {
return sizeof($this->number_arg);
}
public function getNumberArgList() {
return $this->number_arg;
}
public function mutableNumberArg($idx) {
if (!isset($this->number_arg[$idx])) {
$val = new \google\appengine\datastore\v4\GqlQueryArg();
$this->number_arg[$idx] = $val;
return $val;
}
return $this->number_arg[$idx];
}
public function getNumberArg($idx) {
if (isset($this->number_arg[$idx])) {
return $this->number_arg[$idx];
}
if ($idx >= end(array_keys($this->number_arg))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\GqlQueryArg();
}
public function addNumberArg() {
$val = new \google\appengine\datastore\v4\GqlQueryArg();
$this->number_arg[] = $val;
return $val;
}
public function clearNumberArg() {
$this->number_arg = array();
}
public function clear() {
$this->clearQueryString();
$this->clearAllowLiteral();
$this->clearNameArg();
$this->clearNumberArg();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->query_string)) {
$res += 1;
$res += $this->lengthString(strlen($this->query_string));
}
if (isset($this->allow_literal)) {
$res += 2;
}
$this->checkProtoArray($this->name_arg);
$res += 1 * sizeof($this->name_arg);
foreach ($this->name_arg as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
$this->checkProtoArray($this->number_arg);
$res += 1 * sizeof($this->number_arg);
foreach ($this->number_arg as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
if (isset($this->query_string)) {
$out->putVarInt32(10);
$out->putPrefixedString($this->query_string);
}
if (isset($this->allow_literal)) {
$out->putVarInt32(16);
$out->putBoolean($this->allow_literal);
}
$this->checkProtoArray($this->name_arg);
foreach ($this->name_arg as $value) {
$out->putVarInt32(26);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
$this->checkProtoArray($this->number_arg);
foreach ($this->number_arg as $value) {
$out->putVarInt32(34);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$this->setQueryString(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 16:
$this->setAllowLiteral($d->getBoolean());
break;
case 26:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addNameArg()->tryMerge($tmp);
break;
case 34:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addNumberArg()->tryMerge($tmp);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (!isset($this->query_string)) return 'query_string';
foreach ($this->name_arg as $value) {
if (!$value->isInitialized()) return 'name_arg';
}
foreach ($this->number_arg as $value) {
if (!$value->isInitialized()) return 'number_arg';
}
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasQueryString()) {
$this->setQueryString($x->getQueryString());
}
if ($x->hasAllowLiteral()) {
$this->setAllowLiteral($x->getAllowLiteral());
}
foreach ($x->getNameArgList() as $v) {
$this->addNameArg()->copyFrom($v);
}
foreach ($x->getNumberArgList() as $v) {
$this->addNumberArg()->copyFrom($v);
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->query_string) !== isset($x->query_string)) return false;
if (isset($this->query_string) && $this->query_string !== $x->query_string) return false;
if (isset($this->allow_literal) !== isset($x->allow_literal)) return false;
if (isset($this->allow_literal) && $this->allow_literal !== $x->allow_literal) return false;
if (sizeof($this->name_arg) !== sizeof($x->name_arg)) return false;
foreach (array_map(null, $this->name_arg, $x->name_arg) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (sizeof($this->number_arg) !== sizeof($x->number_arg)) return false;
foreach (array_map(null, $this->number_arg, $x->number_arg) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->query_string)) {
$res .= $prefix . "query_string: " . $this->debugFormatString($this->query_string) . "\n";
}
if (isset($this->allow_literal)) {
$res .= $prefix . "allow_literal: " . $this->debugFormatBool($this->allow_literal) . "\n";
}
foreach ($this->name_arg as $value) {
$res .= $prefix . "name_arg <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
foreach ($this->number_arg as $value) {
$res .= $prefix . "number_arg <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4 {
class GqlQueryArg extends \google\net\ProtocolMessage {
public function getName() {
if (!isset($this->name)) {
return '';
}
return $this->name;
}
public function setName($val) {
$this->name = $val;
return $this;
}
public function clearName() {
unset($this->name);
return $this;
}
public function hasName() {
return isset($this->name);
}
public function getValue() {
if (!isset($this->value)) {
return new \google\appengine\datastore\v4\Value();
}
return $this->value;
}
public function mutableValue() {
if (!isset($this->value)) {
$res = new \google\appengine\datastore\v4\Value();
$this->value = $res;
return $res;
}
return $this->value;
}
public function clearValue() {
if (isset($this->value)) {
unset($this->value);
}
}
public function hasValue() {
return isset($this->value);
}
public function getCursor() {
if (!isset($this->cursor)) {
return '';
}
return $this->cursor;
}
public function setCursor($val) {
$this->cursor = $val;
return $this;
}
public function clearCursor() {
unset($this->cursor);
return $this;
}
public function hasCursor() {
return isset($this->cursor);
}
public function clear() {
$this->clearName();
$this->clearValue();
$this->clearCursor();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->name)) {
$res += 1;
$res += $this->lengthString(strlen($this->name));
}
if (isset($this->value)) {
$res += 1;
$res += $this->lengthString($this->value->byteSizePartial());
}
if (isset($this->cursor)) {
$res += 1;
$res += $this->lengthString(strlen($this->cursor));
}
return $res;
}
public function outputPartial($out) {
if (isset($this->name)) {
$out->putVarInt32(10);
$out->putPrefixedString($this->name);
}
if (isset($this->value)) {
$out->putVarInt32(18);
$out->putVarInt32($this->value->byteSizePartial());
$this->value->outputPartial($out);
}
if (isset($this->cursor)) {
$out->putVarInt32(26);
$out->putPrefixedString($this->cursor);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$this->setName(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableValue()->tryMerge($tmp);
break;
case 26:
$length = $d->getVarInt32();
$this->setCursor(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (isset($this->value) && (!$this->value->isInitialized())) return 'value';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasName()) {
$this->setName($x->getName());
}
if ($x->hasValue()) {
$this->mutableValue()->mergeFrom($x->getValue());
}
if ($x->hasCursor()) {
$this->setCursor($x->getCursor());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->name) !== isset($x->name)) return false;
if (isset($this->name) && $this->name !== $x->name) return false;
if (isset($this->value) !== isset($x->value)) return false;
if (isset($this->value) && !$this->value->equals($x->value)) return false;
if (isset($this->cursor) !== isset($x->cursor)) return false;
if (isset($this->cursor) && $this->cursor !== $x->cursor) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->name)) {
$res .= $prefix . "name: " . $this->debugFormatString($this->name) . "\n";
}
if (isset($this->value)) {
$res .= $prefix . "value <\n" . $this->value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->cursor)) {
$res .= $prefix . "cursor: " . $this->debugFormatString($this->cursor) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\QueryResultBatch {
class MoreResultsType {
const NOT_FINISHED = 1;
const MORE_RESULTS_AFTER_LIMIT = 2;
const NO_MORE_RESULTS = 3;
}
}
namespace google\appengine\datastore\v4 {
class QueryResultBatch extends \google\net\ProtocolMessage {
private $entity_result = array();
public function getEntityResultType() {
if (!isset($this->entity_result_type)) {
return 1;
}
return $this->entity_result_type;
}
public function setEntityResultType($val) {
$this->entity_result_type = $val;
return $this;
}
public function clearEntityResultType() {
unset($this->entity_result_type);
return $this;
}
public function hasEntityResultType() {
return isset($this->entity_result_type);
}
public function getEntityResultSize() {
return sizeof($this->entity_result);
}
public function getEntityResultList() {
return $this->entity_result;
}
public function mutableEntityResult($idx) {
if (!isset($this->entity_result[$idx])) {
$val = new \google\appengine\datastore\v4\EntityResult();
$this->entity_result[$idx] = $val;
return $val;
}
return $this->entity_result[$idx];
}
public function getEntityResult($idx) {
if (isset($this->entity_result[$idx])) {
return $this->entity_result[$idx];
}
if ($idx >= end(array_keys($this->entity_result))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\datastore\v4\EntityResult();
}
public function addEntityResult() {
$val = new \google\appengine\datastore\v4\EntityResult();
$this->entity_result[] = $val;
return $val;
}
public function clearEntityResult() {
$this->entity_result = array();
}
public function getEndCursor() {
if (!isset($this->end_cursor)) {
return '';
}
return $this->end_cursor;
}
public function setEndCursor($val) {
$this->end_cursor = $val;
return $this;
}
public function clearEndCursor() {
unset($this->end_cursor);
return $this;
}
public function hasEndCursor() {
return isset($this->end_cursor);
}
public function getMoreResults() {
if (!isset($this->more_results)) {
return 1;
}
return $this->more_results;
}
public function setMoreResults($val) {
$this->more_results = $val;
return $this;
}
public function clearMoreResults() {
unset($this->more_results);
return $this;
}
public function hasMoreResults() {
return isset($this->more_results);
}
public function getSkippedResults() {
if (!isset($this->skipped_results)) {
return 0;
}
return $this->skipped_results;
}
public function setSkippedResults($val) {
$this->skipped_results = $val;
return $this;
}
public function clearSkippedResults() {
unset($this->skipped_results);
return $this;
}
public function hasSkippedResults() {
return isset($this->skipped_results);
}
public function clear() {
$this->clearEntityResultType();
$this->clearEntityResult();
$this->clearEndCursor();
$this->clearMoreResults();
$this->clearSkippedResults();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->entity_result_type)) {
$res += 1;
$res += $this->lengthVarInt64($this->entity_result_type);
}
$this->checkProtoArray($this->entity_result);
$res += 1 * sizeof($this->entity_result);
foreach ($this->entity_result as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
if (isset($this->end_cursor)) {
$res += 1;
$res += $this->lengthString(strlen($this->end_cursor));
}
if (isset($this->more_results)) {
$res += 1;
$res += $this->lengthVarInt64($this->more_results);
}
if (isset($this->skipped_results)) {
$res += 1;
$res += $this->lengthVarInt64($this->skipped_results);
}
return $res;
}
public function outputPartial($out) {
if (isset($this->entity_result_type)) {
$out->putVarInt32(8);
$out->putVarInt32($this->entity_result_type);
}
$this->checkProtoArray($this->entity_result);
foreach ($this->entity_result as $value) {
$out->putVarInt32(18);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
if (isset($this->end_cursor)) {
$out->putVarInt32(34);
$out->putPrefixedString($this->end_cursor);
}
if (isset($this->more_results)) {
$out->putVarInt32(40);
$out->putVarInt32($this->more_results);
}
if (isset($this->skipped_results)) {
$out->putVarInt32(48);
$out->putVarInt32($this->skipped_results);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 8:
$this->setEntityResultType($d->getVarInt32());
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->addEntityResult()->tryMerge($tmp);
break;
case 34:
$length = $d->getVarInt32();
$this->setEndCursor(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 40:
$this->setMoreResults($d->getVarInt32());
break;
case 48:
$this->setSkippedResults($d->getVarInt32());
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
if (!isset($this->entity_result_type)) return 'entity_result_type';
foreach ($this->entity_result as $value) {
if (!$value->isInitialized()) return 'entity_result';
}
if (!isset($this->more_results)) return 'more_results';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasEntityResultType()) {
$this->setEntityResultType($x->getEntityResultType());
}
foreach ($x->getEntityResultList() as $v) {
$this->addEntityResult()->copyFrom($v);
}
if ($x->hasEndCursor()) {
$this->setEndCursor($x->getEndCursor());
}
if ($x->hasMoreResults()) {
$this->setMoreResults($x->getMoreResults());
}
if ($x->hasSkippedResults()) {
$this->setSkippedResults($x->getSkippedResults());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->entity_result_type) !== isset($x->entity_result_type)) return false;
if (isset($this->entity_result_type) && $this->entity_result_type !== $x->entity_result_type) return false;
if (sizeof($this->entity_result) !== sizeof($x->entity_result)) return false;
foreach (array_map(null, $this->entity_result, $x->entity_result) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (isset($this->end_cursor) !== isset($x->end_cursor)) return false;
if (isset($this->end_cursor) && $this->end_cursor !== $x->end_cursor) return false;
if (isset($this->more_results) !== isset($x->more_results)) return false;
if (isset($this->more_results) && $this->more_results !== $x->more_results) return false;
if (isset($this->skipped_results) !== isset($x->skipped_results)) return false;
if (isset($this->skipped_results) && !$this->integerEquals($this->skipped_results, $x->skipped_results)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->entity_result_type)) {
$res .= $prefix . "entity_result_type: " . ($this->entity_result_type) . "\n";
}
foreach ($this->entity_result as $value) {
$res .= $prefix . "entity_result <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->end_cursor)) {
$res .= $prefix . "end_cursor: " . $this->debugFormatString($this->end_cursor) . "\n";
}
if (isset($this->more_results)) {
$res .= $prefix . "more_results: " . ($this->more_results) . "\n";
}
if (isset($this->skipped_results)) {
$res .= $prefix . "skipped_results: " . $this->debugFormatInt32($this->skipped_results) . "\n";
}
return $res;
}
}
}
namespace google\appengine\datastore\v4\Mutation {
class Operation {
const INSERT = 1;
const UPDATE = 2;
const UPSERT = 3;
const DELETE = 4;
const INSERT_WITH_AUTO_ID = 99;
}
}
namespace google\appengine\datastore\v4 {
class Mutation extends \google\net\ProtocolMessage {
public function getOp() {
if (!isset($this->op)) {
return 1;
}
return $this->op;
}
public function setOp($val) {
$this->op = $val;
return $this;
}
public function clearOp() {
unset($this->op);
return $this;
}
public function hasOp() {
return isset($this->op);
}
public function getKey() {
if (!isset($this->key)) {
return new \google\appengine\datastore\v4\Key();
}
return $this->key;
}
public function mutableKey() {
if (!isset($this->key)) {
$res = new \google\appengine\datastore\v4\Key();
$this->key = $res;
return $res;
}
return $this->key;
}
public function clearKey() {
if (isset($this->key)) {
unset($this->key);
}
}
public function hasKey() {
return isset($this->key);
}
public function getEntity() {
if (!isset($this->entity)) {
return new \google\appengine\datastore\v4\Entity();
}
return $this->entity;
}
public function mutableEntity() {
if (!isset($this->entity)) {
$res = new \google\appengine\datastore\v4\Entity();
$this->entity = $res;
return $res;
}
return $this->entity;
}
public function clearEntity() {
if (isset($this->entity)) {
unset($this->entity);
}
}
public function hasEntity() {
return isset($this->entity);
}
public function clear() {
$this->clearOp();
$this->clearKey();
$this->clearEntity();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->op)) {
$res += 1;
$res += $this->lengthVarInt64($this->op);
}
if (isset($this->key)) {
$res += 1;
$res += $this->lengthString($this->key->byteSizePartial());
}
if (isset($this->entity)) {
$res += 1;
$res += $this->lengthString($this->entity->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
if (isset($this->op)) {
$out->putVarInt32(8);
$out->putVarInt32($this->op);
}
if (isset($this->key)) {
$out->putVarInt32(18);
$out->putVarInt32($this->key->byteSizePartial());
$this->key->outputPartial($out);
}
if (isset($this->entity)) {
$out->putVarInt32(26);
$out->putVarInt32($this->entity->byteSizePartial());
$this->entity->outputPartial($out);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 8:
$this->setOp($d->getVarInt32());
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableKey()->tryMerge($tmp);
break;
case 26:
$length = $d->getVarInt32();