This commit is contained in:
Anthony Yeh 2016-06-15 19:50:37 -07:00
Родитель c71d3df495
Коммит dc10fcd5de
10 изменённых файлов: 664 добавлений и 71 удалений

Просмотреть файл

@ -6,8 +6,8 @@ namespace Vitess\Proto\Tabletmanagerdata {
class PreflightSchemaRequest extends \DrSlump\Protobuf\Message {
/** @var string */
public $change = null;
/** @var string[] */
public $changes = array();
/** @var \Closure[] */
@ -17,12 +17,12 @@ namespace Vitess\Proto\Tabletmanagerdata {
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'tabletmanagerdata.PreflightSchemaRequest');
// OPTIONAL STRING change = 1
// REPEATED STRING changes = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "change";
$f->name = "changes";
$f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@ -33,40 +33,60 @@ namespace Vitess\Proto\Tabletmanagerdata {
}
/**
* Check if <change> has a value
* Check if <changes> has a value
*
* @return boolean
*/
public function hasChange(){
public function hasChanges(){
return $this->_has(1);
}
/**
* Clear <change> value
* Clear <changes> value
*
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaRequest
*/
public function clearChange(){
public function clearChanges(){
return $this->_clear(1);
}
/**
* Get <change> value
* Get <changes> value
*
* @param int $idx
* @return string
*/
public function getChange(){
return $this->_get(1);
public function getChanges($idx = NULL){
return $this->_get(1, $idx);
}
/**
* Set <change> value
* Set <changes> value
*
* @param string $value
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaRequest
*/
public function setChange( $value){
return $this->_set(1, $value);
public function setChanges( $value, $idx = NULL){
return $this->_set(1, $value, $idx);
}
/**
* Get all elements of <changes>
*
* @return string[]
*/
public function getChangesList(){
return $this->_get(1);
}
/**
* Add a new element to <changes>
*
* @param string $value
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaRequest
*/
public function addChanges( $value){
return $this->_add(1, $value);
}
}
}

Просмотреть файл

@ -6,11 +6,8 @@ namespace Vitess\Proto\Tabletmanagerdata {
class PreflightSchemaResponse extends \DrSlump\Protobuf\Message {
/** @var \Vitess\Proto\Tabletmanagerdata\SchemaDefinition */
public $before_schema = null;
/** @var \Vitess\Proto\Tabletmanagerdata\SchemaDefinition */
public $after_schema = null;
/** @var \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult[] */
public $change_results = array();
/** @var \Closure[] */
@ -20,22 +17,13 @@ namespace Vitess\Proto\Tabletmanagerdata {
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'tabletmanagerdata.PreflightSchemaResponse');
// OPTIONAL MESSAGE before_schema = 1
// REPEATED MESSAGE change_results = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "before_schema";
$f->name = "change_results";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$f->reference = '\Vitess\Proto\Tabletmanagerdata\SchemaDefinition';
$descriptor->addField($f);
// OPTIONAL MESSAGE after_schema = 2
$f = new \DrSlump\Protobuf\Field();
$f->number = 2;
$f->name = "after_schema";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$f->reference = '\Vitess\Proto\Tabletmanagerdata\SchemaDefinition';
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
$f->reference = '\Vitess\Proto\Tabletmanagerdata\SchemaChangeResult';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@ -46,77 +34,60 @@ namespace Vitess\Proto\Tabletmanagerdata {
}
/**
* Check if <before_schema> has a value
* Check if <change_results> has a value
*
* @return boolean
*/
public function hasBeforeSchema(){
public function hasChangeResults(){
return $this->_has(1);
}
/**
* Clear <before_schema> value
* Clear <change_results> value
*
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaResponse
*/
public function clearBeforeSchema(){
public function clearChangeResults(){
return $this->_clear(1);
}
/**
* Get <before_schema> value
* Get <change_results> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaDefinition
* @param int $idx
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult
*/
public function getBeforeSchema(){
return $this->_get(1);
public function getChangeResults($idx = NULL){
return $this->_get(1, $idx);
}
/**
* Set <before_schema> value
* Set <change_results> value
*
* @param \Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value
* @param \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult $value
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaResponse
*/
public function setBeforeSchema(\Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value){
return $this->_set(1, $value);
public function setChangeResults(\Vitess\Proto\Tabletmanagerdata\SchemaChangeResult $value, $idx = NULL){
return $this->_set(1, $value, $idx);
}
/**
* Check if <after_schema> has a value
* Get all elements of <change_results>
*
* @return boolean
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult[]
*/
public function hasAfterSchema(){
return $this->_has(2);
public function getChangeResultsList(){
return $this->_get(1);
}
/**
* Clear <after_schema> value
* Add a new element to <change_results>
*
* @param \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult $value
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaResponse
*/
public function clearAfterSchema(){
return $this->_clear(2);
}
/**
* Get <after_schema> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaDefinition
*/
public function getAfterSchema(){
return $this->_get(2);
}
/**
* Set <after_schema> value
*
* @param \Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value
* @return \Vitess\Proto\Tabletmanagerdata\PreflightSchemaResponse
*/
public function setAfterSchema(\Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value){
return $this->_set(2, $value);
public function addChangeResults(\Vitess\Proto\Tabletmanagerdata\SchemaChangeResult $value){
return $this->_add(1, $value);
}
}
}

Просмотреть файл

@ -6,6 +6,9 @@ namespace Vitess\Proto\Tabletmanagerdata {
class ReloadSchemaRequest extends \DrSlump\Protobuf\Message {
/** @var string */
public $wait_position = null;
/** @var \Closure[] */
protected static $__extensions = array();
@ -14,12 +17,57 @@ namespace Vitess\Proto\Tabletmanagerdata {
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'tabletmanagerdata.ReloadSchemaRequest');
// OPTIONAL STRING wait_position = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "wait_position";
$f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <wait_position> has a value
*
* @return boolean
*/
public function hasWaitPosition(){
return $this->_has(1);
}
/**
* Clear <wait_position> value
*
* @return \Vitess\Proto\Tabletmanagerdata\ReloadSchemaRequest
*/
public function clearWaitPosition(){
return $this->_clear(1);
}
/**
* Get <wait_position> value
*
* @return string
*/
public function getWaitPosition(){
return $this->_get(1);
}
/**
* Set <wait_position> value
*
* @param string $value
* @return \Vitess\Proto\Tabletmanagerdata\ReloadSchemaRequest
*/
public function setWaitPosition( $value){
return $this->_set(1, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,123 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: tabletmanagerdata.proto
namespace Vitess\Proto\Tabletmanagerdata {
class SchemaChangeResult extends \DrSlump\Protobuf\Message {
/** @var \Vitess\Proto\Tabletmanagerdata\SchemaDefinition */
public $before_schema = null;
/** @var \Vitess\Proto\Tabletmanagerdata\SchemaDefinition */
public $after_schema = null;
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'tabletmanagerdata.SchemaChangeResult');
// OPTIONAL MESSAGE before_schema = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "before_schema";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$f->reference = '\Vitess\Proto\Tabletmanagerdata\SchemaDefinition';
$descriptor->addField($f);
// OPTIONAL MESSAGE after_schema = 2
$f = new \DrSlump\Protobuf\Field();
$f->number = 2;
$f->name = "after_schema";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$f->reference = '\Vitess\Proto\Tabletmanagerdata\SchemaDefinition';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <before_schema> has a value
*
* @return boolean
*/
public function hasBeforeSchema(){
return $this->_has(1);
}
/**
* Clear <before_schema> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult
*/
public function clearBeforeSchema(){
return $this->_clear(1);
}
/**
* Get <before_schema> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaDefinition
*/
public function getBeforeSchema(){
return $this->_get(1);
}
/**
* Set <before_schema> value
*
* @param \Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult
*/
public function setBeforeSchema(\Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value){
return $this->_set(1, $value);
}
/**
* Check if <after_schema> has a value
*
* @return boolean
*/
public function hasAfterSchema(){
return $this->_has(2);
}
/**
* Clear <after_schema> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult
*/
public function clearAfterSchema(){
return $this->_clear(2);
}
/**
* Get <after_schema> value
*
* @return \Vitess\Proto\Tabletmanagerdata\SchemaDefinition
*/
public function getAfterSchema(){
return $this->_get(2);
}
/**
* Set <after_schema> value
*
* @param \Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value
* @return \Vitess\Proto\Tabletmanagerdata\SchemaChangeResult
*/
public function setAfterSchema(\Vitess\Proto\Tabletmanagerdata\SchemaDefinition $value){
return $this->_set(2, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerdata.proto
namespace Vitess\Proto\Throttlerdata {
class MaxRatesRequest extends \DrSlump\Protobuf\Message {
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'throttlerdata.MaxRatesRequest');
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
}
}

Просмотреть файл

@ -0,0 +1,94 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerdata.proto
namespace Vitess\Proto\Throttlerdata {
class MaxRatesResponse extends \DrSlump\Protobuf\Message {
/** @var \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry[] */
public $rates = array();
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'throttlerdata.MaxRatesResponse');
// REPEATED MESSAGE rates = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "rates";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
$f->reference = '\Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <rates> has a value
*
* @return boolean
*/
public function hasRates(){
return $this->_has(1);
}
/**
* Clear <rates> value
*
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse
*/
public function clearRates(){
return $this->_clear(1);
}
/**
* Get <rates> value
*
* @param int $idx
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry
*/
public function getRates($idx = NULL){
return $this->_get(1, $idx);
}
/**
* Set <rates> value
*
* @param \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry $value
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse
*/
public function setRates(\Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry $value, $idx = NULL){
return $this->_set(1, $value, $idx);
}
/**
* Get all elements of <rates>
*
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry[]
*/
public function getRatesList(){
return $this->_get(1);
}
/**
* Add a new element to <rates>
*
* @param \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry $value
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse
*/
public function addRates(\Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry $value){
return $this->_add(1, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,121 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerdata.proto
namespace Vitess\Proto\Throttlerdata\MaxRatesResponse {
class RatesEntry extends \DrSlump\Protobuf\Message {
/** @var string */
public $key = null;
/** @var int */
public $value = null;
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'throttlerdata.MaxRatesResponse.RatesEntry');
// OPTIONAL STRING key = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "key";
$f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f);
// OPTIONAL INT64 value = 2
$f = new \DrSlump\Protobuf\Field();
$f->number = 2;
$f->name = "value";
$f->type = \DrSlump\Protobuf::TYPE_INT64;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <key> has a value
*
* @return boolean
*/
public function hasKey(){
return $this->_has(1);
}
/**
* Clear <key> value
*
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry
*/
public function clearKey(){
return $this->_clear(1);
}
/**
* Get <key> value
*
* @return string
*/
public function getKey(){
return $this->_get(1);
}
/**
* Set <key> value
*
* @param string $value
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry
*/
public function setKey( $value){
return $this->_set(1, $value);
}
/**
* Check if <value> has a value
*
* @return boolean
*/
public function hasValue(){
return $this->_has(2);
}
/**
* Clear <value> value
*
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry
*/
public function clearValue(){
return $this->_clear(2);
}
/**
* Get <value> value
*
* @return int
*/
public function getValue(){
return $this->_get(2);
}
/**
* Set <value> value
*
* @param int $value
* @return \Vitess\Proto\Throttlerdata\MaxRatesResponse\RatesEntry
*/
public function setValue( $value){
return $this->_set(2, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,73 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerdata.proto
namespace Vitess\Proto\Throttlerdata {
class SetMaxRateRequest extends \DrSlump\Protobuf\Message {
/** @var int */
public $rate = null;
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'throttlerdata.SetMaxRateRequest');
// OPTIONAL INT64 rate = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "rate";
$f->type = \DrSlump\Protobuf::TYPE_INT64;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <rate> has a value
*
* @return boolean
*/
public function hasRate(){
return $this->_has(1);
}
/**
* Clear <rate> value
*
* @return \Vitess\Proto\Throttlerdata\SetMaxRateRequest
*/
public function clearRate(){
return $this->_clear(1);
}
/**
* Get <rate> value
*
* @return int
*/
public function getRate(){
return $this->_get(1);
}
/**
* Set <rate> value
*
* @param int $value
* @return \Vitess\Proto\Throttlerdata\SetMaxRateRequest
*/
public function setRate( $value){
return $this->_set(1, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,93 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerdata.proto
namespace Vitess\Proto\Throttlerdata {
class SetMaxRateResponse extends \DrSlump\Protobuf\Message {
/** @var string[] */
public $names = array();
/** @var \Closure[] */
protected static $__extensions = array();
public static function descriptor()
{
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'throttlerdata.SetMaxRateResponse');
// REPEATED STRING names = 1
$f = new \DrSlump\Protobuf\Field();
$f->number = 1;
$f->name = "names";
$f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor;
}
/**
* Check if <names> has a value
*
* @return boolean
*/
public function hasNames(){
return $this->_has(1);
}
/**
* Clear <names> value
*
* @return \Vitess\Proto\Throttlerdata\SetMaxRateResponse
*/
public function clearNames(){
return $this->_clear(1);
}
/**
* Get <names> value
*
* @param int $idx
* @return string
*/
public function getNames($idx = NULL){
return $this->_get(1, $idx);
}
/**
* Set <names> value
*
* @param string $value
* @return \Vitess\Proto\Throttlerdata\SetMaxRateResponse
*/
public function setNames( $value, $idx = NULL){
return $this->_set(1, $value, $idx);
}
/**
* Get all elements of <names>
*
* @return string[]
*/
public function getNamesList(){
return $this->_get(1);
}
/**
* Add a new element to <names>
*
* @param string $value
* @return \Vitess\Proto\Throttlerdata\SetMaxRateResponse
*/
public function addNames( $value){
return $this->_add(1, $value);
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: throttlerservice.proto
namespace Vitess\Proto\Throttlerservice {
class ThrottlerClient extends \Grpc\BaseStub {
public function __construct($hostname, $opts) {
parent::__construct($hostname, $opts);
}
/**
* @param Vitess\Proto\Throttlerdata\MaxRatesRequest $input
*/
public function MaxRates(\Vitess\Proto\Throttlerdata\MaxRatesRequest $argument, $metadata = array(), $options = array()) {
return $this->_simpleRequest('/throttlerservice.Throttler/MaxRates', $argument, '\Vitess\Proto\Throttlerdata\MaxRatesResponse::deserialize', $metadata, $options);
}
/**
* @param Vitess\Proto\Throttlerdata\SetMaxRateRequest $input
*/
public function SetMaxRate(\Vitess\Proto\Throttlerdata\SetMaxRateRequest $argument, $metadata = array(), $options = array()) {
return $this->_simpleRequest('/throttlerservice.Throttler/SetMaxRate', $argument, '\Vitess\Proto\Throttlerdata\SetMaxRateResponse::deserialize', $metadata, $options);
}
}
}