blob: d9b7ecfef0c78b05c4ffe4b8f6ee14be780eaedc [file]
<?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/base/capabilities.proto
namespace dummy {
require_once 'google/appengine/runtime/proto/ProtocolMessage.php';
}
namespace google\appengine {
class CapabilityConfigList extends \google\net\ProtocolMessage {
private $config = array();
public function getConfigSize() {
return sizeof($this->config);
}
public function getConfigList() {
return $this->config;
}
public function mutableConfig($idx) {
if (!isset($this->config[$idx])) {
$val = new \google\appengine\CapabilityConfig();
$this->config[$idx] = $val;
return $val;
}
return $this->config[$idx];
}
public function getConfig($idx) {
if (isset($this->config[$idx])) {
return $this->config[$idx];
}
if ($idx >= end(array_keys($this->config))) {
throw new \OutOfRangeException('index out of range: ' + $idx);
}
return new \google\appengine\CapabilityConfig();
}
public function addConfig() {
$val = new \google\appengine\CapabilityConfig();
$this->config[] = $val;
return $val;
}
public function clearConfig() {
$this->config = array();
}
public function getDefaultConfig() {
if (!isset($this->default_config)) {
return new \google\appengine\CapabilityConfig();
}
return $this->default_config;
}
public function mutableDefaultConfig() {
if (!isset($this->default_config)) {
$res = new \google\appengine\CapabilityConfig();
$this->default_config = $res;
return $res;
}
return $this->default_config;
}
public function clearDefaultConfig() {
if (isset($this->default_config)) {
unset($this->default_config);
}
}
public function hasDefaultConfig() {
return isset($this->default_config);
}
public function clear() {
$this->clearConfig();
$this->clearDefaultConfig();
}
public function byteSizePartial() {
$res = 0;
$this->checkProtoArray($this->config);
$res += 1 * sizeof($this->config);
foreach ($this->config as $value) {
$res += $this->lengthString($value->byteSizePartial());
}
if (isset($this->default_config)) {
$res += 1;
$res += $this->lengthString($this->default_config->byteSizePartial());
}
return $res;
}
public function outputPartial($out) {
$this->checkProtoArray($this->config);
foreach ($this->config as $value) {
$out->putVarInt32(10);
$out->putVarInt32($value->byteSizePartial());
$value->outputPartial($out);
}
if (isset($this->default_config)) {
$out->putVarInt32(18);
$out->putVarInt32($this->default_config->byteSizePartial());
$this->default_config->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->addConfig()->tryMerge($tmp);
break;
case 18:
$length = $d->getVarInt32();
$tmp = new \google\net\Decoder($d->buffer(), $d->pos(), $d->pos() + $length);
$d->skip($length);
$this->mutableDefaultConfig()->tryMerge($tmp);
break;
case 0:
throw new \google\net\ProtocolBufferDecodeError();
break;
default:
$d->skipData($tt);
}
};
}
public function checkInitialized() {
foreach ($this->config as $value) {
if (!$value->isInitialized()) return 'config';
}
if (isset($this->default_config) && (!$this->default_config->isInitialized())) return 'default_config';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
foreach ($x->getConfigList() as $v) {
$this->addConfig()->copyFrom($v);
}
if ($x->hasDefaultConfig()) {
$this->mutableDefaultConfig()->mergeFrom($x->getDefaultConfig());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (sizeof($this->config) !== sizeof($x->config)) return false;
foreach (array_map(null, $this->config, $x->config) as $v) {
if (!$v[0]->equals($v[1])) return false;
}
if (isset($this->default_config) !== isset($x->default_config)) return false;
if (isset($this->default_config) && !$this->default_config->equals($x->default_config)) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
foreach ($this->config as $value) {
$res .= $prefix . "config <\n" . $value->shortDebugString($prefix . " ") . $prefix . ">\n";
}
if (isset($this->default_config)) {
$res .= $prefix . "default_config <\n" . $this->default_config->shortDebugString($prefix . " ") . $prefix . ">\n";
}
return $res;
}
}
}
namespace google\appengine\CapabilityConfig {
class Status {
const ENABLED = 1;
const SCHEDULED = 2;
const DISABLED = 3;
const UNKNOWN = 4;
}
}
namespace google\appengine {
class CapabilityConfig extends \google\net\ProtocolMessage {
public function getPackage() {
if (!isset($this->package)) {
return '';
}
return $this->package;
}
public function setPackage($val) {
$this->package = $val;
return $this;
}
public function clearPackage() {
unset($this->package);
return $this;
}
public function hasPackage() {
return isset($this->package);
}
public function getCapability() {
if (!isset($this->capability)) {
return '';
}
return $this->capability;
}
public function setCapability($val) {
$this->capability = $val;
return $this;
}
public function clearCapability() {
unset($this->capability);
return $this;
}
public function hasCapability() {
return isset($this->capability);
}
public function getStatus() {
if (!isset($this->status)) {
return 4;
}
return $this->status;
}
public function setStatus($val) {
$this->status = $val;
return $this;
}
public function clearStatus() {
unset($this->status);
return $this;
}
public function hasStatus() {
return isset($this->status);
}
public function getInternalMessage() {
if (!isset($this->internal_message)) {
return '';
}
return $this->internal_message;
}
public function setInternalMessage($val) {
$this->internal_message = $val;
return $this;
}
public function clearInternalMessage() {
unset($this->internal_message);
return $this;
}
public function hasInternalMessage() {
return isset($this->internal_message);
}
public function getAdminMessage() {
if (!isset($this->admin_message)) {
return '';
}
return $this->admin_message;
}
public function setAdminMessage($val) {
$this->admin_message = $val;
return $this;
}
public function clearAdminMessage() {
unset($this->admin_message);
return $this;
}
public function hasAdminMessage() {
return isset($this->admin_message);
}
public function getErrorMessage() {
if (!isset($this->error_message)) {
return '';
}
return $this->error_message;
}
public function setErrorMessage($val) {
$this->error_message = $val;
return $this;
}
public function clearErrorMessage() {
unset($this->error_message);
return $this;
}
public function hasErrorMessage() {
return isset($this->error_message);
}
public function getScheduledTime() {
if (!isset($this->scheduled_time)) {
return '';
}
return $this->scheduled_time;
}
public function setScheduledTime($val) {
$this->scheduled_time = $val;
return $this;
}
public function clearScheduledTime() {
unset($this->scheduled_time);
return $this;
}
public function hasScheduledTime() {
return isset($this->scheduled_time);
}
public function clear() {
$this->clearPackage();
$this->clearCapability();
$this->clearStatus();
$this->clearInternalMessage();
$this->clearAdminMessage();
$this->clearErrorMessage();
$this->clearScheduledTime();
}
public function byteSizePartial() {
$res = 0;
if (isset($this->package)) {
$res += 1;
$res += $this->lengthString(strlen($this->package));
}
if (isset($this->capability)) {
$res += 1;
$res += $this->lengthString(strlen($this->capability));
}
if (isset($this->status)) {
$res += 1;
$res += $this->lengthVarInt64($this->status);
}
if (isset($this->internal_message)) {
$res += 1;
$res += $this->lengthString(strlen($this->internal_message));
}
if (isset($this->admin_message)) {
$res += 1;
$res += $this->lengthString(strlen($this->admin_message));
}
if (isset($this->error_message)) {
$res += 1;
$res += $this->lengthString(strlen($this->error_message));
}
if (isset($this->scheduled_time)) {
$res += 1;
$res += $this->lengthString(strlen($this->scheduled_time));
}
return $res;
}
public function outputPartial($out) {
if (isset($this->package)) {
$out->putVarInt32(10);
$out->putPrefixedString($this->package);
}
if (isset($this->capability)) {
$out->putVarInt32(18);
$out->putPrefixedString($this->capability);
}
if (isset($this->status)) {
$out->putVarInt32(24);
$out->putVarInt32($this->status);
}
if (isset($this->internal_message)) {
$out->putVarInt32(34);
$out->putPrefixedString($this->internal_message);
}
if (isset($this->admin_message)) {
$out->putVarInt32(42);
$out->putPrefixedString($this->admin_message);
}
if (isset($this->error_message)) {
$out->putVarInt32(50);
$out->putPrefixedString($this->error_message);
}
if (isset($this->scheduled_time)) {
$out->putVarInt32(58);
$out->putPrefixedString($this->scheduled_time);
}
}
public function tryMerge($d) {
while($d->avail() > 0) {
$tt = $d->getVarInt32();
switch ($tt) {
case 10:
$length = $d->getVarInt32();
$this->setPackage(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 18:
$length = $d->getVarInt32();
$this->setCapability(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 24:
$this->setStatus($d->getVarInt32());
break;
case 34:
$length = $d->getVarInt32();
$this->setInternalMessage(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 42:
$length = $d->getVarInt32();
$this->setAdminMessage(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 50:
$length = $d->getVarInt32();
$this->setErrorMessage(substr($d->buffer(), $d->pos(), $length));
$d->skip($length);
break;
case 58:
$length = $d->getVarInt32();
$this->setScheduledTime(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->package)) return 'package';
if (!isset($this->capability)) return 'capability';
return null;
}
public function mergeFrom($x) {
if ($x === $this) { throw new \IllegalArgumentException('Cannot copy message to itself'); }
if ($x->hasPackage()) {
$this->setPackage($x->getPackage());
}
if ($x->hasCapability()) {
$this->setCapability($x->getCapability());
}
if ($x->hasStatus()) {
$this->setStatus($x->getStatus());
}
if ($x->hasInternalMessage()) {
$this->setInternalMessage($x->getInternalMessage());
}
if ($x->hasAdminMessage()) {
$this->setAdminMessage($x->getAdminMessage());
}
if ($x->hasErrorMessage()) {
$this->setErrorMessage($x->getErrorMessage());
}
if ($x->hasScheduledTime()) {
$this->setScheduledTime($x->getScheduledTime());
}
}
public function equals($x) {
if ($x === $this) { return true; }
if (isset($this->package) !== isset($x->package)) return false;
if (isset($this->package) && $this->package !== $x->package) return false;
if (isset($this->capability) !== isset($x->capability)) return false;
if (isset($this->capability) && $this->capability !== $x->capability) return false;
if (isset($this->status) !== isset($x->status)) return false;
if (isset($this->status) && $this->status !== $x->status) return false;
if (isset($this->internal_message) !== isset($x->internal_message)) return false;
if (isset($this->internal_message) && $this->internal_message !== $x->internal_message) return false;
if (isset($this->admin_message) !== isset($x->admin_message)) return false;
if (isset($this->admin_message) && $this->admin_message !== $x->admin_message) return false;
if (isset($this->error_message) !== isset($x->error_message)) return false;
if (isset($this->error_message) && $this->error_message !== $x->error_message) return false;
if (isset($this->scheduled_time) !== isset($x->scheduled_time)) return false;
if (isset($this->scheduled_time) && $this->scheduled_time !== $x->scheduled_time) return false;
return true;
}
public function shortDebugString($prefix = "") {
$res = '';
if (isset($this->package)) {
$res .= $prefix . "package: " . $this->debugFormatString($this->package) . "\n";
}
if (isset($this->capability)) {
$res .= $prefix . "capability: " . $this->debugFormatString($this->capability) . "\n";
}
if (isset($this->status)) {
$res .= $prefix . "status: " . ($this->status) . "\n";
}
if (isset($this->internal_message)) {
$res .= $prefix . "internal_message: " . $this->debugFormatString($this->internal_message) . "\n";
}
if (isset($this->admin_message)) {
$res .= $prefix . "admin_message: " . $this->debugFormatString($this->admin_message) . "\n";
}
if (isset($this->error_message)) {
$res .= $prefix . "error_message: " . $this->debugFormatString($this->error_message) . "\n";
}
if (isset($this->scheduled_time)) {
$res .= $prefix . "scheduled_time: " . $this->debugFormatString($this->scheduled_time) . "\n";
}
return $res;
}
}
}