Skip to content

Instantly share code, notes, and snippets.

@chobie
Last active December 17, 2015 11:09
Show Gist options
  • Save chobie/5600520 to your computer and use it in GitHub Desktop.
Save chobie/5600520 to your computer and use it in GitHub Desktop.
<?php
/**
* RpbErrorResp
*
* @message RpbErrorResp
*
* -*- magic properties -*-
*
* @property string $errmsg
* @property int $errcode
*/
class RpbErrorResp
{
protected static $scheme = array(
'properties' => array(
'errmsg' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'errcode' => array(
'type' => 'int',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'errmsg',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'errcode',
'type' => 13,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getErrmsg()
{
$result = null;
if (array_key_exists('errmsg', $this->_properties)) {
$result = $this->_properties['errmsg'];
}
return $result;
}
public function setErrmsg($errmsg)
{
$this->_properties['errmsg'] = $errmsg;
}
public function getErrcode()
{
$result = null;
if (array_key_exists('errcode', $this->_properties)) {
$result = $this->_properties['errcode'];
}
return $result;
}
public function setErrcode($errcode)
{
$this->_properties['errcode'] = $errcode;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetServerInfoResp
*
* @message RpbGetServerInfoResp
*
* -*- magic properties -*-
*
* @property string $node
* @property string $server_version
*/
class RpbGetServerInfoResp
{
protected static $scheme = array(
'properties' => array(
'node' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'server_version' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'node',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'server_version',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getNode()
{
$result = null;
if (array_key_exists('node', $this->_properties)) {
$result = $this->_properties['node'];
}
return $result;
}
public function setNode($node)
{
$this->_properties['node'] = $node;
}
public function getServerVersion()
{
$result = null;
if (array_key_exists('server_version', $this->_properties)) {
$result = $this->_properties['server_version'];
}
return $result;
}
public function setServerVersion($server_version)
{
$this->_properties['server_version'] = $server_version;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbPair
*
* @message RpbPair
*
* -*- magic properties -*-
*
* @property string $key
* @property string $value
*/
class RpbPair
{
protected static $scheme = array(
'properties' => array(
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'value' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'key',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'value',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getValue()
{
$result = null;
if (array_key_exists('value', $this->_properties)) {
$result = $this->_properties['value'];
}
return $result;
}
public function setValue($value)
{
$this->_properties['value'] = $value;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetBucketReq
*
* @message RpbGetBucketReq
*
* -*- magic properties -*-
*
* @property string $bucket
*/
class RpbGetBucketReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetBucketResp
*
* @message RpbGetBucketResp
*
* -*- magic properties -*-
*
* @property RpbBucketProps $props
*/
class RpbGetBucketResp
{
protected static $scheme = array(
'properties' => array(
'props' => array(
'type' => 'RpbBucketProps',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'props',
'type' => 11,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbBucketProps',
),
),
);
public function getProps()
{
$result = null;
if (array_key_exists('props', $this->_properties)) {
$result = $this->_properties['props'];
}
return $result;
}
public function setProps($props)
{
$this->_properties['props'] = $props;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbSetBucketReq
*
* @message RpbSetBucketReq
*
* -*- magic properties -*-
*
* @property string $bucket
* @property RpbBucketProps $props
*/
class RpbSetBucketReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'props' => array(
'type' => 'RpbBucketProps',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'props',
'type' => 11,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbBucketProps',
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getProps()
{
$result = null;
if (array_key_exists('props', $this->_properties)) {
$result = $this->_properties['props'];
}
return $result;
}
public function setProps($props)
{
$this->_properties['props'] = $props;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbResetBucketReq
*
* @message RpbResetBucketReq
*
* -*- magic properties -*-
*
* @property string $bucket
*/
class RpbResetBucketReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbModFun
*
* @message RpbModFun
*
* -*- magic properties -*-
*
* @property string $module
* @property string $function
*/
class RpbModFun
{
protected static $scheme = array(
'properties' => array(
'module' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'function' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'module',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'function',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getModule()
{
$result = null;
if (array_key_exists('module', $this->_properties)) {
$result = $this->_properties['module'];
}
return $result;
}
public function setModule($module)
{
$this->_properties['module'] = $module;
}
public function getFunction()
{
$result = null;
if (array_key_exists('function', $this->_properties)) {
$result = $this->_properties['function'];
}
return $result;
}
public function setFunction($function)
{
$this->_properties['function'] = $function;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbCommitHook
*
* @message RpbCommitHook
*
* -*- magic properties -*-
*
* @property RpbModFun $modfun
* @property string $name
*/
class RpbCommitHook
{
protected static $scheme = array(
'properties' => array(
'modfun' => array(
'type' => 'RpbModFun',
'opts' => array(
'tag' => 1,
),
),
'name' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'modfun',
'type' => 11,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbModFun',
),
2 => array(
'name' => 'name',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getModfun()
{
$result = null;
if (array_key_exists('modfun', $this->_properties)) {
$result = $this->_properties['modfun'];
}
return $result;
}
public function setModfun($modfun)
{
$this->_properties['modfun'] = $modfun;
}
public function getName()
{
$result = null;
if (array_key_exists('name', $this->_properties)) {
$result = $this->_properties['name'];
}
return $result;
}
public function setName($name)
{
$this->_properties['name'] = $name;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbBucketProps_RpbReplMode
*
* @enum RpbBucketProps.RpbReplMode
*/
class RpbBucketProps_RpbReplMode
{
const FALSE = 0;
const REALTIME = 1;
const FULLSYNC = 2;
const TRUE = 3;
}
/**
* RpbBucketProps
*
* @message RpbBucketProps
*
* -*- magic properties -*-
*
* @property int $n_val
* @property bool $allow_mult
* @property bool $last_write_wins
* @property array $precommit
* @property bool $has_precommit
* @property array $postcommit
* @property bool $has_postcommit
* @property RpbModFun $chash_keyfun
* @property RpbModFun $linkfun
* @property int $old_vclock
* @property int $young_vclock
* @property int $big_vclock
* @property int $small_vclock
* @property int $pr
* @property int $r
* @property int $w
* @property int $pw
* @property int $dw
* @property int $rw
* @property bool $basic_quorum
* @property bool $notfound_ok
* @property string $backend
* @property bool $search
* @property int $repl
*/
class RpbBucketProps
{
protected static $scheme = array(
'properties' => array(
'n_val' => array(
'type' => 'int',
'opts' => array(
'tag' => 1,
),
),
'allow_mult' => array(
'type' => 'bool',
'opts' => array(
'tag' => 2,
),
),
'last_write_wins' => array(
'type' => 'bool',
'opts' => array(
'tag' => 3,
),
),
'precommit' => array(
'type' => 'array',
'opts' => array(
'tag' => 4,
),
),
'has_precommit' => array(
'type' => 'bool',
'opts' => array(
'tag' => 5,
),
),
'postcommit' => array(
'type' => 'array',
'opts' => array(
'tag' => 6,
),
),
'has_postcommit' => array(
'type' => 'bool',
'opts' => array(
'tag' => 7,
),
),
'chash_keyfun' => array(
'type' => 'RpbModFun',
'opts' => array(
'tag' => 8,
),
),
'linkfun' => array(
'type' => 'RpbModFun',
'opts' => array(
'tag' => 9,
),
),
'old_vclock' => array(
'type' => 'int',
'opts' => array(
'tag' => 10,
),
),
'young_vclock' => array(
'type' => 'int',
'opts' => array(
'tag' => 11,
),
),
'big_vclock' => array(
'type' => 'int',
'opts' => array(
'tag' => 12,
),
),
'small_vclock' => array(
'type' => 'int',
'opts' => array(
'tag' => 13,
),
),
'pr' => array(
'type' => 'int',
'opts' => array(
'tag' => 14,
),
),
'r' => array(
'type' => 'int',
'opts' => array(
'tag' => 15,
),
),
'w' => array(
'type' => 'int',
'opts' => array(
'tag' => 16,
),
),
'pw' => array(
'type' => 'int',
'opts' => array(
'tag' => 17,
),
),
'dw' => array(
'type' => 'int',
'opts' => array(
'tag' => 18,
),
),
'rw' => array(
'type' => 'int',
'opts' => array(
'tag' => 19,
),
),
'basic_quorum' => array(
'type' => 'bool',
'opts' => array(
'tag' => 20,
),
),
'notfound_ok' => array(
'type' => 'bool',
'opts' => array(
'tag' => 21,
),
),
'backend' => array(
'type' => 'string',
'opts' => array(
'tag' => 22,
),
),
'search' => array(
'type' => 'bool',
'opts' => array(
'tag' => 23,
),
),
'repl' => array(
'type' => 'int',
'opts' => array(
'tag' => 24,
),
),
),
'scheme' => array(
1 => array(
'name' => 'n_val',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'allow_mult',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'last_write_wins',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'precommit',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbCommitHook',
),
5 => array(
'name' => 'has_precommit',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => false,
),
6 => array(
'name' => 'postcommit',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbCommitHook',
),
7 => array(
'name' => 'has_postcommit',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => false,
),
8 => array(
'name' => 'chash_keyfun',
'type' => 11,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbModFun',
),
9 => array(
'name' => 'linkfun',
'type' => 11,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbModFun',
),
10 => array(
'name' => 'old_vclock',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
11 => array(
'name' => 'young_vclock',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
12 => array(
'name' => 'big_vclock',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
13 => array(
'name' => 'small_vclock',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
14 => array(
'name' => 'pr',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
15 => array(
'name' => 'r',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
16 => array(
'name' => 'w',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
17 => array(
'name' => 'pw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
18 => array(
'name' => 'dw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
19 => array(
'name' => 'rw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
20 => array(
'name' => 'basic_quorum',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
21 => array(
'name' => 'notfound_ok',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
22 => array(
'name' => 'backend',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
23 => array(
'name' => 'search',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
24 => array(
'name' => 'repl',
'type' => 14,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getNVal()
{
$result = null;
if (array_key_exists('n_val', $this->_properties)) {
$result = $this->_properties['n_val'];
}
return $result;
}
public function setNVal($n_val)
{
$this->_properties['n_val'] = $n_val;
}
public function getAllowMult()
{
$result = null;
if (array_key_exists('allow_mult', $this->_properties)) {
$result = $this->_properties['allow_mult'];
}
return $result;
}
public function setAllowMult($allow_mult)
{
$this->_properties['allow_mult'] = $allow_mult;
}
public function getLastWriteWins()
{
$result = null;
if (array_key_exists('last_write_wins', $this->_properties)) {
$result = $this->_properties['last_write_wins'];
}
return $result;
}
public function setLastWriteWins($last_write_wins)
{
$this->_properties['last_write_wins'] = $last_write_wins;
}
public function getPrecommit()
{
$result = null;
if (array_key_exists('precommit', $this->_properties)) {
$result = $this->_properties['precommit'];
}
return $result;
}
public function addPrecommit($precommit)
{
$this->_properties['precommit'][] = $precommit;
}
public function getHasPrecommit()
{
$result = null;
if (array_key_exists('has_precommit', $this->_properties)) {
$result = $this->_properties['has_precommit'];
}
return $result;
}
public function setHasPrecommit($has_precommit)
{
$this->_properties['has_precommit'] = $has_precommit;
}
public function getPostcommit()
{
$result = null;
if (array_key_exists('postcommit', $this->_properties)) {
$result = $this->_properties['postcommit'];
}
return $result;
}
public function addPostcommit($postcommit)
{
$this->_properties['postcommit'][] = $postcommit;
}
public function getHasPostcommit()
{
$result = null;
if (array_key_exists('has_postcommit', $this->_properties)) {
$result = $this->_properties['has_postcommit'];
}
return $result;
}
public function setHasPostcommit($has_postcommit)
{
$this->_properties['has_postcommit'] = $has_postcommit;
}
public function getChashKeyfun()
{
$result = null;
if (array_key_exists('chash_keyfun', $this->_properties)) {
$result = $this->_properties['chash_keyfun'];
}
return $result;
}
public function setChashKeyfun($chash_keyfun)
{
$this->_properties['chash_keyfun'] = $chash_keyfun;
}
public function getLinkfun()
{
$result = null;
if (array_key_exists('linkfun', $this->_properties)) {
$result = $this->_properties['linkfun'];
}
return $result;
}
public function setLinkfun($linkfun)
{
$this->_properties['linkfun'] = $linkfun;
}
public function getOldVclock()
{
$result = null;
if (array_key_exists('old_vclock', $this->_properties)) {
$result = $this->_properties['old_vclock'];
}
return $result;
}
public function setOldVclock($old_vclock)
{
$this->_properties['old_vclock'] = $old_vclock;
}
public function getYoungVclock()
{
$result = null;
if (array_key_exists('young_vclock', $this->_properties)) {
$result = $this->_properties['young_vclock'];
}
return $result;
}
public function setYoungVclock($young_vclock)
{
$this->_properties['young_vclock'] = $young_vclock;
}
public function getBigVclock()
{
$result = null;
if (array_key_exists('big_vclock', $this->_properties)) {
$result = $this->_properties['big_vclock'];
}
return $result;
}
public function setBigVclock($big_vclock)
{
$this->_properties['big_vclock'] = $big_vclock;
}
public function getSmallVclock()
{
$result = null;
if (array_key_exists('small_vclock', $this->_properties)) {
$result = $this->_properties['small_vclock'];
}
return $result;
}
public function setSmallVclock($small_vclock)
{
$this->_properties['small_vclock'] = $small_vclock;
}
public function getPr()
{
$result = null;
if (array_key_exists('pr', $this->_properties)) {
$result = $this->_properties['pr'];
}
return $result;
}
public function setPr($pr)
{
$this->_properties['pr'] = $pr;
}
public function getR()
{
$result = null;
if (array_key_exists('r', $this->_properties)) {
$result = $this->_properties['r'];
}
return $result;
}
public function setR($r)
{
$this->_properties['r'] = $r;
}
public function getW()
{
$result = null;
if (array_key_exists('w', $this->_properties)) {
$result = $this->_properties['w'];
}
return $result;
}
public function setW($w)
{
$this->_properties['w'] = $w;
}
public function getPw()
{
$result = null;
if (array_key_exists('pw', $this->_properties)) {
$result = $this->_properties['pw'];
}
return $result;
}
public function setPw($pw)
{
$this->_properties['pw'] = $pw;
}
public function getDw()
{
$result = null;
if (array_key_exists('dw', $this->_properties)) {
$result = $this->_properties['dw'];
}
return $result;
}
public function setDw($dw)
{
$this->_properties['dw'] = $dw;
}
public function getRw()
{
$result = null;
if (array_key_exists('rw', $this->_properties)) {
$result = $this->_properties['rw'];
}
return $result;
}
public function setRw($rw)
{
$this->_properties['rw'] = $rw;
}
public function getBasicQuorum()
{
$result = null;
if (array_key_exists('basic_quorum', $this->_properties)) {
$result = $this->_properties['basic_quorum'];
}
return $result;
}
public function setBasicQuorum($basic_quorum)
{
$this->_properties['basic_quorum'] = $basic_quorum;
}
public function getNotfoundOk()
{
$result = null;
if (array_key_exists('notfound_ok', $this->_properties)) {
$result = $this->_properties['notfound_ok'];
}
return $result;
}
public function setNotfoundOk($notfound_ok)
{
$this->_properties['notfound_ok'] = $notfound_ok;
}
public function getBackend()
{
$result = null;
if (array_key_exists('backend', $this->_properties)) {
$result = $this->_properties['backend'];
}
return $result;
}
public function setBackend($backend)
{
$this->_properties['backend'] = $backend;
}
public function getSearch()
{
$result = null;
if (array_key_exists('search', $this->_properties)) {
$result = $this->_properties['search'];
}
return $result;
}
public function setSearch($search)
{
$this->_properties['search'] = $search;
}
public function getRepl()
{
$result = null;
if (array_key_exists('repl', $this->_properties)) {
$result = $this->_properties['repl'];
}
return $result;
}
public function setRepl($repl)
{
$this->_properties['repl'] = $repl;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetClientIdResp
*
* @message RpbGetClientIdResp
*
* -*- magic properties -*-
*
* @property string $client_id
*/
class RpbGetClientIdResp
{
protected static $scheme = array(
'properties' => array(
'client_id' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'client_id',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getClientId()
{
$result = null;
if (array_key_exists('client_id', $this->_properties)) {
$result = $this->_properties['client_id'];
}
return $result;
}
public function setClientId($client_id)
{
$this->_properties['client_id'] = $client_id;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbSetClientIdReq
*
* @message RpbSetClientIdReq
*
* -*- magic properties -*-
*
* @property string $client_id
*/
class RpbSetClientIdReq
{
protected static $scheme = array(
'properties' => array(
'client_id' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'client_id',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getClientId()
{
$result = null;
if (array_key_exists('client_id', $this->_properties)) {
$result = $this->_properties['client_id'];
}
return $result;
}
public function setClientId($client_id)
{
$this->_properties['client_id'] = $client_id;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetReq
*
* @message RpbGetReq
*
* -*- magic properties -*-
*
* @property string $bucket
* @property string $key
* @property int $r
* @property int $pr
* @property bool $basic_quorum
* @property bool $notfound_ok
* @property string $if_modified
* @property bool $head
* @property bool $deletedvclock
* @property int $timeout
*/
class RpbGetReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'r' => array(
'type' => 'int',
'opts' => array(
'tag' => 3,
),
),
'pr' => array(
'type' => 'int',
'opts' => array(
'tag' => 4,
),
),
'basic_quorum' => array(
'type' => 'bool',
'opts' => array(
'tag' => 5,
),
),
'notfound_ok' => array(
'type' => 'bool',
'opts' => array(
'tag' => 6,
),
),
'if_modified' => array(
'type' => 'string',
'opts' => array(
'tag' => 7,
),
),
'head' => array(
'type' => 'bool',
'opts' => array(
'tag' => 8,
),
),
'deletedvclock' => array(
'type' => 'bool',
'opts' => array(
'tag' => 9,
),
),
'timeout' => array(
'type' => 'int',
'opts' => array(
'tag' => 10,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'key',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'r',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'pr',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
5 => array(
'name' => 'basic_quorum',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'notfound_ok',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
7 => array(
'name' => 'if_modified',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
8 => array(
'name' => 'head',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
9 => array(
'name' => 'deletedvclock',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
10 => array(
'name' => 'timeout',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getR()
{
$result = null;
if (array_key_exists('r', $this->_properties)) {
$result = $this->_properties['r'];
}
return $result;
}
public function setR($r)
{
$this->_properties['r'] = $r;
}
public function getPr()
{
$result = null;
if (array_key_exists('pr', $this->_properties)) {
$result = $this->_properties['pr'];
}
return $result;
}
public function setPr($pr)
{
$this->_properties['pr'] = $pr;
}
public function getBasicQuorum()
{
$result = null;
if (array_key_exists('basic_quorum', $this->_properties)) {
$result = $this->_properties['basic_quorum'];
}
return $result;
}
public function setBasicQuorum($basic_quorum)
{
$this->_properties['basic_quorum'] = $basic_quorum;
}
public function getNotfoundOk()
{
$result = null;
if (array_key_exists('notfound_ok', $this->_properties)) {
$result = $this->_properties['notfound_ok'];
}
return $result;
}
public function setNotfoundOk($notfound_ok)
{
$this->_properties['notfound_ok'] = $notfound_ok;
}
public function getIfModified()
{
$result = null;
if (array_key_exists('if_modified', $this->_properties)) {
$result = $this->_properties['if_modified'];
}
return $result;
}
public function setIfModified($if_modified)
{
$this->_properties['if_modified'] = $if_modified;
}
public function getHead()
{
$result = null;
if (array_key_exists('head', $this->_properties)) {
$result = $this->_properties['head'];
}
return $result;
}
public function setHead($head)
{
$this->_properties['head'] = $head;
}
public function getDeletedvclock()
{
$result = null;
if (array_key_exists('deletedvclock', $this->_properties)) {
$result = $this->_properties['deletedvclock'];
}
return $result;
}
public function setDeletedvclock($deletedvclock)
{
$this->_properties['deletedvclock'] = $deletedvclock;
}
public function getTimeout()
{
$result = null;
if (array_key_exists('timeout', $this->_properties)) {
$result = $this->_properties['timeout'];
}
return $result;
}
public function setTimeout($timeout)
{
$this->_properties['timeout'] = $timeout;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbGetResp
*
* @message RpbGetResp
*
* -*- magic properties -*-
*
* @property array $content
* @property string $vclock
* @property bool $unchanged
*/
class RpbGetResp
{
protected static $scheme = array(
'properties' => array(
'content' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
'vclock' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'unchanged' => array(
'type' => 'bool',
'opts' => array(
'tag' => 3,
),
),
),
'scheme' => array(
1 => array(
'name' => 'content',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbContent',
),
2 => array(
'name' => 'vclock',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'unchanged',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getContent()
{
$result = null;
if (array_key_exists('content', $this->_properties)) {
$result = $this->_properties['content'];
}
return $result;
}
public function addContent($content)
{
$this->_properties['content'][] = $content;
}
public function getVclock()
{
$result = null;
if (array_key_exists('vclock', $this->_properties)) {
$result = $this->_properties['vclock'];
}
return $result;
}
public function setVclock($vclock)
{
$this->_properties['vclock'] = $vclock;
}
public function getUnchanged()
{
$result = null;
if (array_key_exists('unchanged', $this->_properties)) {
$result = $this->_properties['unchanged'];
}
return $result;
}
public function setUnchanged($unchanged)
{
$this->_properties['unchanged'] = $unchanged;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbPutReq
*
* @message RpbPutReq
*
* -*- magic properties -*-
*
* @property string $bucket
* @property string $key
* @property string $vclock
* @property RpbContent $content
* @property int $w
* @property int $dw
* @property bool $return_body
* @property int $pw
* @property bool $if_not_modified
* @property bool $if_none_match
* @property bool $return_head
* @property int $timeout
* @property bool $asis
*/
class RpbPutReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'vclock' => array(
'type' => 'string',
'opts' => array(
'tag' => 3,
),
),
'content' => array(
'type' => 'RpbContent',
'opts' => array(
'tag' => 4,
),
),
'w' => array(
'type' => 'int',
'opts' => array(
'tag' => 5,
),
),
'dw' => array(
'type' => 'int',
'opts' => array(
'tag' => 6,
),
),
'return_body' => array(
'type' => 'bool',
'opts' => array(
'tag' => 7,
),
),
'pw' => array(
'type' => 'int',
'opts' => array(
'tag' => 8,
),
),
'if_not_modified' => array(
'type' => 'bool',
'opts' => array(
'tag' => 9,
),
),
'if_none_match' => array(
'type' => 'bool',
'opts' => array(
'tag' => 10,
),
),
'return_head' => array(
'type' => 'bool',
'opts' => array(
'tag' => 11,
),
),
'timeout' => array(
'type' => 'int',
'opts' => array(
'tag' => 12,
),
),
'asis' => array(
'type' => 'bool',
'opts' => array(
'tag' => 13,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'key',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'vclock',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'content',
'type' => 11,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
'message' => 'RpbContent',
),
5 => array(
'name' => 'w',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'dw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
7 => array(
'name' => 'return_body',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
8 => array(
'name' => 'pw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
9 => array(
'name' => 'if_not_modified',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
10 => array(
'name' => 'if_none_match',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
11 => array(
'name' => 'return_head',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
12 => array(
'name' => 'timeout',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
13 => array(
'name' => 'asis',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getVclock()
{
$result = null;
if (array_key_exists('vclock', $this->_properties)) {
$result = $this->_properties['vclock'];
}
return $result;
}
public function setVclock($vclock)
{
$this->_properties['vclock'] = $vclock;
}
public function getContent()
{
$result = null;
if (array_key_exists('content', $this->_properties)) {
$result = $this->_properties['content'];
}
return $result;
}
public function setContent($content)
{
$this->_properties['content'] = $content;
}
public function getW()
{
$result = null;
if (array_key_exists('w', $this->_properties)) {
$result = $this->_properties['w'];
}
return $result;
}
public function setW($w)
{
$this->_properties['w'] = $w;
}
public function getDw()
{
$result = null;
if (array_key_exists('dw', $this->_properties)) {
$result = $this->_properties['dw'];
}
return $result;
}
public function setDw($dw)
{
$this->_properties['dw'] = $dw;
}
public function getReturnBody()
{
$result = null;
if (array_key_exists('return_body', $this->_properties)) {
$result = $this->_properties['return_body'];
}
return $result;
}
public function setReturnBody($return_body)
{
$this->_properties['return_body'] = $return_body;
}
public function getPw()
{
$result = null;
if (array_key_exists('pw', $this->_properties)) {
$result = $this->_properties['pw'];
}
return $result;
}
public function setPw($pw)
{
$this->_properties['pw'] = $pw;
}
public function getIfNotModified()
{
$result = null;
if (array_key_exists('if_not_modified', $this->_properties)) {
$result = $this->_properties['if_not_modified'];
}
return $result;
}
public function setIfNotModified($if_not_modified)
{
$this->_properties['if_not_modified'] = $if_not_modified;
}
public function getIfNoneMatch()
{
$result = null;
if (array_key_exists('if_none_match', $this->_properties)) {
$result = $this->_properties['if_none_match'];
}
return $result;
}
public function setIfNoneMatch($if_none_match)
{
$this->_properties['if_none_match'] = $if_none_match;
}
public function getReturnHead()
{
$result = null;
if (array_key_exists('return_head', $this->_properties)) {
$result = $this->_properties['return_head'];
}
return $result;
}
public function setReturnHead($return_head)
{
$this->_properties['return_head'] = $return_head;
}
public function getTimeout()
{
$result = null;
if (array_key_exists('timeout', $this->_properties)) {
$result = $this->_properties['timeout'];
}
return $result;
}
public function setTimeout($timeout)
{
$this->_properties['timeout'] = $timeout;
}
public function getAsis()
{
$result = null;
if (array_key_exists('asis', $this->_properties)) {
$result = $this->_properties['asis'];
}
return $result;
}
public function setAsis($asis)
{
$this->_properties['asis'] = $asis;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbPutResp
*
* @message RpbPutResp
*
* -*- magic properties -*-
*
* @property array $content
* @property string $vclock
* @property string $key
*/
class RpbPutResp
{
protected static $scheme = array(
'properties' => array(
'content' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
'vclock' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 3,
),
),
),
'scheme' => array(
1 => array(
'name' => 'content',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbContent',
),
2 => array(
'name' => 'vclock',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'key',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getContent()
{
$result = null;
if (array_key_exists('content', $this->_properties)) {
$result = $this->_properties['content'];
}
return $result;
}
public function addContent($content)
{
$this->_properties['content'][] = $content;
}
public function getVclock()
{
$result = null;
if (array_key_exists('vclock', $this->_properties)) {
$result = $this->_properties['vclock'];
}
return $result;
}
public function setVclock($vclock)
{
$this->_properties['vclock'] = $vclock;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbDelReq
*
* @message RpbDelReq
*
* -*- magic properties -*-
*
* @property string $bucket
* @property string $key
* @property int $rw
* @property string $vclock
* @property int $r
* @property int $w
* @property int $pr
* @property int $pw
* @property int $dw
* @property int $timeout
*/
class RpbDelReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'rw' => array(
'type' => 'int',
'opts' => array(
'tag' => 3,
),
),
'vclock' => array(
'type' => 'string',
'opts' => array(
'tag' => 4,
),
),
'r' => array(
'type' => 'int',
'opts' => array(
'tag' => 5,
),
),
'w' => array(
'type' => 'int',
'opts' => array(
'tag' => 6,
),
),
'pr' => array(
'type' => 'int',
'opts' => array(
'tag' => 7,
),
),
'pw' => array(
'type' => 'int',
'opts' => array(
'tag' => 8,
),
),
'dw' => array(
'type' => 'int',
'opts' => array(
'tag' => 9,
),
),
'timeout' => array(
'type' => 'int',
'opts' => array(
'tag' => 10,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'key',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'rw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'vclock',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
5 => array(
'name' => 'r',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'w',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
7 => array(
'name' => 'pr',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
8 => array(
'name' => 'pw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
9 => array(
'name' => 'dw',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
10 => array(
'name' => 'timeout',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getRw()
{
$result = null;
if (array_key_exists('rw', $this->_properties)) {
$result = $this->_properties['rw'];
}
return $result;
}
public function setRw($rw)
{
$this->_properties['rw'] = $rw;
}
public function getVclock()
{
$result = null;
if (array_key_exists('vclock', $this->_properties)) {
$result = $this->_properties['vclock'];
}
return $result;
}
public function setVclock($vclock)
{
$this->_properties['vclock'] = $vclock;
}
public function getR()
{
$result = null;
if (array_key_exists('r', $this->_properties)) {
$result = $this->_properties['r'];
}
return $result;
}
public function setR($r)
{
$this->_properties['r'] = $r;
}
public function getW()
{
$result = null;
if (array_key_exists('w', $this->_properties)) {
$result = $this->_properties['w'];
}
return $result;
}
public function setW($w)
{
$this->_properties['w'] = $w;
}
public function getPr()
{
$result = null;
if (array_key_exists('pr', $this->_properties)) {
$result = $this->_properties['pr'];
}
return $result;
}
public function setPr($pr)
{
$this->_properties['pr'] = $pr;
}
public function getPw()
{
$result = null;
if (array_key_exists('pw', $this->_properties)) {
$result = $this->_properties['pw'];
}
return $result;
}
public function setPw($pw)
{
$this->_properties['pw'] = $pw;
}
public function getDw()
{
$result = null;
if (array_key_exists('dw', $this->_properties)) {
$result = $this->_properties['dw'];
}
return $result;
}
public function setDw($dw)
{
$this->_properties['dw'] = $dw;
}
public function getTimeout()
{
$result = null;
if (array_key_exists('timeout', $this->_properties)) {
$result = $this->_properties['timeout'];
}
return $result;
}
public function setTimeout($timeout)
{
$this->_properties['timeout'] = $timeout;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbListBucketsResp
*
* @message RpbListBucketsResp
*
* -*- magic properties -*-
*
* @property array $buckets
*/
class RpbListBucketsResp
{
protected static $scheme = array(
'properties' => array(
'buckets' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'buckets',
'type' => 12,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
),
),
);
public function getBuckets()
{
$result = null;
if (array_key_exists('buckets', $this->_properties)) {
$result = $this->_properties['buckets'];
}
return $result;
}
public function addBuckets($buckets)
{
$this->_properties['buckets'][] = $buckets;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbListKeysReq
*
* @message RpbListKeysReq
*
* -*- magic properties -*-
*
* @property string $bucket
*/
class RpbListKeysReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbListKeysResp
*
* @message RpbListKeysResp
*
* -*- magic properties -*-
*
* @property array $keys
* @property bool $done
*/
class RpbListKeysResp
{
protected static $scheme = array(
'properties' => array(
'keys' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
'done' => array(
'type' => 'bool',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'keys',
'type' => 12,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'done',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getKeys()
{
$result = null;
if (array_key_exists('keys', $this->_properties)) {
$result = $this->_properties['keys'];
}
return $result;
}
public function addKeys($keys)
{
$this->_properties['keys'][] = $keys;
}
public function getDone()
{
$result = null;
if (array_key_exists('done', $this->_properties)) {
$result = $this->_properties['done'];
}
return $result;
}
public function setDone($done)
{
$this->_properties['done'] = $done;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbMapRedReq
*
* @message RpbMapRedReq
*
* -*- magic properties -*-
*
* @property string $request
* @property string $content_type
*/
class RpbMapRedReq
{
protected static $scheme = array(
'properties' => array(
'request' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'content_type' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
),
'scheme' => array(
1 => array(
'name' => 'request',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'content_type',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getRequest()
{
$result = null;
if (array_key_exists('request', $this->_properties)) {
$result = $this->_properties['request'];
}
return $result;
}
public function setRequest($request)
{
$this->_properties['request'] = $request;
}
public function getContentType()
{
$result = null;
if (array_key_exists('content_type', $this->_properties)) {
$result = $this->_properties['content_type'];
}
return $result;
}
public function setContentType($content_type)
{
$this->_properties['content_type'] = $content_type;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbMapRedResp
*
* @message RpbMapRedResp
*
* -*- magic properties -*-
*
* @property int $phase
* @property string $response
* @property bool $done
*/
class RpbMapRedResp
{
protected static $scheme = array(
'properties' => array(
'phase' => array(
'type' => 'int',
'opts' => array(
'tag' => 1,
),
),
'response' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'done' => array(
'type' => 'bool',
'opts' => array(
'tag' => 3,
),
),
),
'scheme' => array(
1 => array(
'name' => 'phase',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'response',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'done',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getPhase()
{
$result = null;
if (array_key_exists('phase', $this->_properties)) {
$result = $this->_properties['phase'];
}
return $result;
}
public function setPhase($phase)
{
$this->_properties['phase'] = $phase;
}
public function getResponse()
{
$result = null;
if (array_key_exists('response', $this->_properties)) {
$result = $this->_properties['response'];
}
return $result;
}
public function setResponse($response)
{
$this->_properties['response'] = $response;
}
public function getDone()
{
$result = null;
if (array_key_exists('done', $this->_properties)) {
$result = $this->_properties['done'];
}
return $result;
}
public function setDone($done)
{
$this->_properties['done'] = $done;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbIndexReq_IndexQueryType
*
* @enum RpbIndexReq.IndexQueryType
*/
class RpbIndexReq_IndexQueryType
{
const EQ = 0;
const RANGE = 1;
}
/**
* RpbIndexReq
*
* @message RpbIndexReq
*
* -*- magic properties -*-
*
* @property string $bucket
* @property string $index
* @property int $qtype
* @property string $key
* @property string $range_min
* @property string $range_max
*/
class RpbIndexReq
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'index' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'qtype' => array(
'type' => 'int',
'opts' => array(
'tag' => 3,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 4,
),
),
'range_min' => array(
'type' => 'string',
'opts' => array(
'tag' => 5,
),
),
'range_max' => array(
'type' => 'string',
'opts' => array(
'tag' => 6,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'index',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'qtype',
'type' => 14,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'key',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
5 => array(
'name' => 'range_min',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'range_max',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getIndex()
{
$result = null;
if (array_key_exists('index', $this->_properties)) {
$result = $this->_properties['index'];
}
return $result;
}
public function setIndex($index)
{
$this->_properties['index'] = $index;
}
public function getQtype()
{
$result = null;
if (array_key_exists('qtype', $this->_properties)) {
$result = $this->_properties['qtype'];
}
return $result;
}
public function setQtype($qtype)
{
$this->_properties['qtype'] = $qtype;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getRangeMin()
{
$result = null;
if (array_key_exists('range_min', $this->_properties)) {
$result = $this->_properties['range_min'];
}
return $result;
}
public function setRangeMin($range_min)
{
$this->_properties['range_min'] = $range_min;
}
public function getRangeMax()
{
$result = null;
if (array_key_exists('range_max', $this->_properties)) {
$result = $this->_properties['range_max'];
}
return $result;
}
public function setRangeMax($range_max)
{
$this->_properties['range_max'] = $range_max;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbIndexResp
*
* @message RpbIndexResp
*
* -*- magic properties -*-
*
* @property array $keys
*/
class RpbIndexResp
{
protected static $scheme = array(
'properties' => array(
'keys' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'keys',
'type' => 12,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
),
),
);
public function getKeys()
{
$result = null;
if (array_key_exists('keys', $this->_properties)) {
$result = $this->_properties['keys'];
}
return $result;
}
public function addKeys($keys)
{
$this->_properties['keys'][] = $keys;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbContent
*
* @message RpbContent
*
* -*- magic properties -*-
*
* @property string $value
* @property string $content_type
* @property string $charset
* @property string $content_encoding
* @property string $vtag
* @property array $links
* @property int $last_mod
* @property int $last_mod_usecs
* @property array $usermeta
* @property array $indexes
* @property bool $deleted
*/
class RpbContent
{
protected static $scheme = array(
'properties' => array(
'value' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'content_type' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'charset' => array(
'type' => 'string',
'opts' => array(
'tag' => 3,
),
),
'content_encoding' => array(
'type' => 'string',
'opts' => array(
'tag' => 4,
),
),
'vtag' => array(
'type' => 'string',
'opts' => array(
'tag' => 5,
),
),
'links' => array(
'type' => 'array',
'opts' => array(
'tag' => 6,
),
),
'last_mod' => array(
'type' => 'int',
'opts' => array(
'tag' => 7,
),
),
'last_mod_usecs' => array(
'type' => 'int',
'opts' => array(
'tag' => 8,
),
),
'usermeta' => array(
'type' => 'array',
'opts' => array(
'tag' => 9,
),
),
'indexes' => array(
'type' => 'array',
'opts' => array(
'tag' => 10,
),
),
'deleted' => array(
'type' => 'bool',
'opts' => array(
'tag' => 11,
),
),
),
'scheme' => array(
1 => array(
'name' => 'value',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'content_type',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'charset',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'content_encoding',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
5 => array(
'name' => 'vtag',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'links',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbLink',
),
7 => array(
'name' => 'last_mod',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
8 => array(
'name' => 'last_mod_usecs',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
9 => array(
'name' => 'usermeta',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbPair',
),
10 => array(
'name' => 'indexes',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbPair',
),
11 => array(
'name' => 'deleted',
'type' => 8,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getValue()
{
$result = null;
if (array_key_exists('value', $this->_properties)) {
$result = $this->_properties['value'];
}
return $result;
}
public function setValue($value)
{
$this->_properties['value'] = $value;
}
public function getContentType()
{
$result = null;
if (array_key_exists('content_type', $this->_properties)) {
$result = $this->_properties['content_type'];
}
return $result;
}
public function setContentType($content_type)
{
$this->_properties['content_type'] = $content_type;
}
public function getCharset()
{
$result = null;
if (array_key_exists('charset', $this->_properties)) {
$result = $this->_properties['charset'];
}
return $result;
}
public function setCharset($charset)
{
$this->_properties['charset'] = $charset;
}
public function getContentEncoding()
{
$result = null;
if (array_key_exists('content_encoding', $this->_properties)) {
$result = $this->_properties['content_encoding'];
}
return $result;
}
public function setContentEncoding($content_encoding)
{
$this->_properties['content_encoding'] = $content_encoding;
}
public function getVtag()
{
$result = null;
if (array_key_exists('vtag', $this->_properties)) {
$result = $this->_properties['vtag'];
}
return $result;
}
public function setVtag($vtag)
{
$this->_properties['vtag'] = $vtag;
}
public function getLinks()
{
$result = null;
if (array_key_exists('links', $this->_properties)) {
$result = $this->_properties['links'];
}
return $result;
}
public function addLinks($links)
{
$this->_properties['links'][] = $links;
}
public function getLastMod()
{
$result = null;
if (array_key_exists('last_mod', $this->_properties)) {
$result = $this->_properties['last_mod'];
}
return $result;
}
public function setLastMod($last_mod)
{
$this->_properties['last_mod'] = $last_mod;
}
public function getLastModUsecs()
{
$result = null;
if (array_key_exists('last_mod_usecs', $this->_properties)) {
$result = $this->_properties['last_mod_usecs'];
}
return $result;
}
public function setLastModUsecs($last_mod_usecs)
{
$this->_properties['last_mod_usecs'] = $last_mod_usecs;
}
public function getUsermeta()
{
$result = null;
if (array_key_exists('usermeta', $this->_properties)) {
$result = $this->_properties['usermeta'];
}
return $result;
}
public function addUsermeta($usermeta)
{
$this->_properties['usermeta'][] = $usermeta;
}
public function getIndexes()
{
$result = null;
if (array_key_exists('indexes', $this->_properties)) {
$result = $this->_properties['indexes'];
}
return $result;
}
public function addIndexes($indexes)
{
$this->_properties['indexes'][] = $indexes;
}
public function getDeleted()
{
$result = null;
if (array_key_exists('deleted', $this->_properties)) {
$result = $this->_properties['deleted'];
}
return $result;
}
public function setDeleted($deleted)
{
$this->_properties['deleted'] = $deleted;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbLink
*
* @message RpbLink
*
* -*- magic properties -*-
*
* @property string $bucket
* @property string $key
* @property string $tag
*/
class RpbLink
{
protected static $scheme = array(
'properties' => array(
'bucket' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'key' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'tag' => array(
'type' => 'string',
'opts' => array(
'tag' => 3,
),
),
),
'scheme' => array(
1 => array(
'name' => 'bucket',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'key',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'tag',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getBucket()
{
$result = null;
if (array_key_exists('bucket', $this->_properties)) {
$result = $this->_properties['bucket'];
}
return $result;
}
public function setBucket($bucket)
{
$this->_properties['bucket'] = $bucket;
}
public function getKey()
{
$result = null;
if (array_key_exists('key', $this->_properties)) {
$result = $this->_properties['key'];
}
return $result;
}
public function setKey($key)
{
$this->_properties['key'] = $key;
}
public function getTag()
{
$result = null;
if (array_key_exists('tag', $this->_properties)) {
$result = $this->_properties['tag'];
}
return $result;
}
public function setTag($tag)
{
$this->_properties['tag'] = $tag;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbSearchDoc
*
* @message RpbSearchDoc
*
* -*- magic properties -*-
*
* @property array $fields
*/
class RpbSearchDoc
{
protected static $scheme = array(
'properties' => array(
'fields' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
),
'scheme' => array(
1 => array(
'name' => 'fields',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbPair',
),
),
);
public function getFields()
{
$result = null;
if (array_key_exists('fields', $this->_properties)) {
$result = $this->_properties['fields'];
}
return $result;
}
public function addFields($fields)
{
$this->_properties['fields'][] = $fields;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbSearchQueryReq
*
* @message RpbSearchQueryReq
*
* -*- magic properties -*-
*
* @property string $q
* @property string $index
* @property int $rows
* @property int $start
* @property string $sort
* @property string $filter
* @property string $df
* @property string $op
* @property array $fl
* @property string $presort
*/
class RpbSearchQueryReq
{
protected static $scheme = array(
'properties' => array(
'q' => array(
'type' => 'string',
'opts' => array(
'tag' => 1,
),
),
'index' => array(
'type' => 'string',
'opts' => array(
'tag' => 2,
),
),
'rows' => array(
'type' => 'int',
'opts' => array(
'tag' => 3,
),
),
'start' => array(
'type' => 'int',
'opts' => array(
'tag' => 4,
),
),
'sort' => array(
'type' => 'string',
'opts' => array(
'tag' => 5,
),
),
'filter' => array(
'type' => 'string',
'opts' => array(
'tag' => 6,
),
),
'df' => array(
'type' => 'string',
'opts' => array(
'tag' => 7,
),
),
'op' => array(
'type' => 'string',
'opts' => array(
'tag' => 8,
),
),
'fl' => array(
'type' => 'array',
'opts' => array(
'tag' => 9,
),
),
'presort' => array(
'type' => 'string',
'opts' => array(
'tag' => 10,
),
),
),
'scheme' => array(
1 => array(
'name' => 'q',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
2 => array(
'name' => 'index',
'type' => 12,
'required' => true,
'optional' => false,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'rows',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
4 => array(
'name' => 'start',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
5 => array(
'name' => 'sort',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
6 => array(
'name' => 'filter',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
7 => array(
'name' => 'df',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
8 => array(
'name' => 'op',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
9 => array(
'name' => 'fl',
'type' => 12,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
),
10 => array(
'name' => 'presort',
'type' => 12,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getQ()
{
$result = null;
if (array_key_exists('q', $this->_properties)) {
$result = $this->_properties['q'];
}
return $result;
}
public function setQ($q)
{
$this->_properties['q'] = $q;
}
public function getIndex()
{
$result = null;
if (array_key_exists('index', $this->_properties)) {
$result = $this->_properties['index'];
}
return $result;
}
public function setIndex($index)
{
$this->_properties['index'] = $index;
}
public function getRows()
{
$result = null;
if (array_key_exists('rows', $this->_properties)) {
$result = $this->_properties['rows'];
}
return $result;
}
public function setRows($rows)
{
$this->_properties['rows'] = $rows;
}
public function getStart()
{
$result = null;
if (array_key_exists('start', $this->_properties)) {
$result = $this->_properties['start'];
}
return $result;
}
public function setStart($start)
{
$this->_properties['start'] = $start;
}
public function getSort()
{
$result = null;
if (array_key_exists('sort', $this->_properties)) {
$result = $this->_properties['sort'];
}
return $result;
}
public function setSort($sort)
{
$this->_properties['sort'] = $sort;
}
public function getFilter()
{
$result = null;
if (array_key_exists('filter', $this->_properties)) {
$result = $this->_properties['filter'];
}
return $result;
}
public function setFilter($filter)
{
$this->_properties['filter'] = $filter;
}
public function getDf()
{
$result = null;
if (array_key_exists('df', $this->_properties)) {
$result = $this->_properties['df'];
}
return $result;
}
public function setDf($df)
{
$this->_properties['df'] = $df;
}
public function getOp()
{
$result = null;
if (array_key_exists('op', $this->_properties)) {
$result = $this->_properties['op'];
}
return $result;
}
public function setOp($op)
{
$this->_properties['op'] = $op;
}
public function getFl()
{
$result = null;
if (array_key_exists('fl', $this->_properties)) {
$result = $this->_properties['fl'];
}
return $result;
}
public function addFl($fl)
{
$this->_properties['fl'][] = $fl;
}
public function getPresort()
{
$result = null;
if (array_key_exists('presort', $this->_properties)) {
$result = $this->_properties['presort'];
}
return $result;
}
public function setPresort($presort)
{
$this->_properties['presort'] = $presort;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
/**
* RpbSearchQueryResp
*
* @message RpbSearchQueryResp
*
* -*- magic properties -*-
*
* @property array $docs
* @property float $max_score
* @property int $num_found
*/
class RpbSearchQueryResp
{
protected static $scheme = array(
'properties' => array(
'docs' => array(
'type' => 'array',
'opts' => array(
'tag' => 1,
),
),
'max_score' => array(
'type' => 'float',
'opts' => array(
'tag' => 2,
),
),
'num_found' => array(
'type' => 'int',
'opts' => array(
'tag' => 3,
),
),
),
'scheme' => array(
1 => array(
'name' => 'docs',
'type' => 11,
'required' => false,
'optional' => false,
'repeated' => true,
'packable' => false,
'default' => null,
'message' => 'RpbSearchDoc',
),
2 => array(
'name' => 'max_score',
'type' => 2,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
3 => array(
'name' => 'num_found',
'type' => 13,
'required' => false,
'optional' => true,
'repeated' => false,
'packable' => false,
'default' => null,
),
),
);
public function getDocs()
{
$result = null;
if (array_key_exists('docs', $this->_properties)) {
$result = $this->_properties['docs'];
}
return $result;
}
public function addDocs($docs)
{
$this->_properties['docs'][] = $docs;
}
public function getMaxScore()
{
$result = null;
if (array_key_exists('max_score', $this->_properties)) {
$result = $this->_properties['max_score'];
}
return $result;
}
public function setMaxScore($max_score)
{
$this->_properties['max_score'] = $max_score;
}
public function getNumFound()
{
$result = null;
if (array_key_exists('num_found', $this->_properties)) {
$result = $this->_properties['num_found'];
}
return $result;
}
public function setNumFound($num_found)
{
$this->_properties['num_found'] = $num_found;
}
/**
* get descriptor for protocol buffers
*
* @return array
*/
public static function getDescriptor()
{
return self::$scheme['scheme'];
}
}
<?php
require "riak.proto.php";
$req = new RpbGetReq();
$req->setBucket("test");
$req->setKey("doc");
$data = ProtocolBuffers::encode($req);
$w = pack("N", strlen($data)+1). pack("C", 0x09) . $data;
$sock = fsockopen("tcp://localhost:8087");
$begin = microtime(true);
$c = 0;
$e = 0;
$attempts = 1000;
for ($i = 0; $i < $attempts; $i++) {
fwrite($sock, $w);
$a = microtime(true);
$length = fread($sock, 4);
$lengt = current(unpack("N", $length));
$d = fread($sock, $lengt);
$b = microtime(true);
$e += $b - $a;
$type = substr($d, 0, 1);
$result = substr($d, 1);
$a = microtime(true);
$resp = ProtocolBuffers::decode("RpbGetResp", $result);
$b = microtime(true);
$c += $b - $a;
}
$end = microtime(true);
printf("[Riak Protocol Buffers test]\n");
printf("# %d requests (%f/sec)\n", $attempts, $end - $begin, ($attempts / ($end-$begin)));
printf("# Total read bytes: %f Mbytes (%d bytes/msg)\n", $attempts * ($lengt + 4 + 1) * $attempts / 1024 / 1024, $lengt+4+1);
printf("# PHP ProtocolBuffers decode time (total): %f (%f/sec)\n", $c, (($end-$begin) / $c));
printf("# Read time (total): %f\n", $e);
@chobie
Copy link
Author

chobie commented May 17, 2013

chobie:php-riak chobie$ php -v
PHP 5.3.10 (cli) (built: Feb 11 2012 01:17:31) (DEBUG)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

chobie:php-riak chobie$ php riak.php
[Riak Protocol Buffers test]

  • 1000 requests (0.803228/sec)
  • Total read bytes: 119.209290 Mbytes (125 bytes/msg)
  • PHP ProtocolBuffers decode time (total): 0.020468 (39.243582/sec)
  • Read time (total): 0.760873

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment