зеркало из https://github.com/github/vitess-gh.git
Re-generating protos.
This commit is contained in:
Родитель
7c095d762b
Коммит
7394e2a9fc
|
@ -217,23 +217,31 @@ func (m *Tablet) GetTags() map[string]string {
|
|||
|
||||
// A Shard contains data about a subset of the data whithin a keyspace.
|
||||
type Shard struct {
|
||||
// master_alias is the tablet alias of the master for the shard.
|
||||
// If it is unset, then there is no master in this shard yet.
|
||||
// No lock is necessary to update this field, when for instance
|
||||
// TabletExternallyReparented updates this. However, we lock the
|
||||
// shard for reparenting operations (InitShardMaster,
|
||||
// PlannedReparentShard,EmergencyReparentShard), to guarantee
|
||||
// exclusive operation.
|
||||
MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias,json=masterAlias" json:"master_alias,omitempty"`
|
||||
// key_range is the KeyRange for this shard. It can be unset if:
|
||||
// - we are not using range-based sharding in this shard.
|
||||
// - the shard covers the entire keyrange.
|
||||
// This must match the shard name based on our other conventions, but
|
||||
// helpful to have it decomposed here.
|
||||
// Once set at creation time, it is never changed.
|
||||
KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange" json:"key_range,omitempty"`
|
||||
// served_types has at most one entry per TabletType
|
||||
// The keyspace lock is always taken when changing this.
|
||||
ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes" json:"served_types,omitempty"`
|
||||
// SourceShards is the list of shards we're replicating from,
|
||||
// using filtered replication.
|
||||
// The keyspace lock is always taken when changing this.
|
||||
SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards,json=sourceShards" json:"source_shards,omitempty"`
|
||||
// Cells is the list of cells that contain tablets for this shard.
|
||||
// No lock is necessary to update this field.
|
||||
Cells []string `protobuf:"bytes,5,rep,name=cells" json:"cells,omitempty"`
|
||||
// tablet_controls has at most one entry per TabletType
|
||||
// tablet_controls has at most one entry per TabletType.
|
||||
// The keyspace lock is always taken when changing this.
|
||||
TabletControls []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls,json=tabletControls" json:"tablet_controls,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema {
|
||||
|
||||
class AutoIncrement extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $column = null;
|
||||
|
||||
/** @var string */
|
||||
public $sequence = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.AutoIncrement');
|
||||
|
||||
// OPTIONAL STRING column = 1
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 1;
|
||||
$f->name = "column";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_STRING;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$descriptor->addField($f);
|
||||
|
||||
// OPTIONAL STRING sequence = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "sequence";
|
||||
$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 <column> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasColumn(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <column> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\AutoIncrement
|
||||
*/
|
||||
public function clearColumn(){
|
||||
return $this->_clear(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <column> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getColumn(){
|
||||
return $this->_get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <column> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\AutoIncrement
|
||||
*/
|
||||
public function setColumn( $value){
|
||||
return $this->_set(1, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <sequence> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasSequence(){
|
||||
return $this->_has(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <sequence> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\AutoIncrement
|
||||
*/
|
||||
public function clearSequence(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <sequence> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSequence(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <sequence> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\AutoIncrement
|
||||
*/
|
||||
public function setSequence( $value){
|
||||
return $this->_set(2, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema {
|
||||
|
||||
class ColumnVindex extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $column = null;
|
||||
|
||||
/** @var string */
|
||||
public $name = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.ColumnVindex');
|
||||
|
||||
// OPTIONAL STRING column = 1
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 1;
|
||||
$f->name = "column";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_STRING;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$descriptor->addField($f);
|
||||
|
||||
// OPTIONAL STRING name = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "name";
|
||||
$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 <column> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasColumn(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <column> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex
|
||||
*/
|
||||
public function clearColumn(){
|
||||
return $this->_clear(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <column> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getColumn(){
|
||||
return $this->_get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <column> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex
|
||||
*/
|
||||
public function setColumn( $value){
|
||||
return $this->_set(1, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <name> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasName(){
|
||||
return $this->_has(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <name> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex
|
||||
*/
|
||||
public function clearName(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <name> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <name> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex
|
||||
*/
|
||||
public function setName( $value){
|
||||
return $this->_set(2, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,211 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema {
|
||||
|
||||
class Keyspace extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var boolean */
|
||||
public $sharded = null;
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\Keyspace\VindexesEntry[] */
|
||||
public $vindexes = array();
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\Keyspace\TablesEntry[] */
|
||||
public $tables = array();
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Keyspace');
|
||||
|
||||
// OPTIONAL BOOL sharded = 1
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 1;
|
||||
$f->name = "sharded";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_BOOL;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$descriptor->addField($f);
|
||||
|
||||
// REPEATED MESSAGE vindexes = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "vindexes";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
|
||||
$f->reference = '\Vitess\Proto\Vschema\Keyspace\VindexesEntry';
|
||||
$descriptor->addField($f);
|
||||
|
||||
// REPEATED MESSAGE tables = 3
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 3;
|
||||
$f->name = "tables";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
|
||||
$f->reference = '\Vitess\Proto\Vschema\Keyspace\TablesEntry';
|
||||
$descriptor->addField($f);
|
||||
|
||||
foreach (self::$__extensions as $cb) {
|
||||
$descriptor->addField($cb(), true);
|
||||
}
|
||||
|
||||
return $descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <sharded> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasSharded(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <sharded> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function clearSharded(){
|
||||
return $this->_clear(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <sharded> value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getSharded(){
|
||||
return $this->_get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <sharded> value
|
||||
*
|
||||
* @param boolean $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function setSharded( $value){
|
||||
return $this->_set(1, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <vindexes> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasVindexes(){
|
||||
return $this->_has(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <vindexes> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function clearVindexes(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <vindexes> value
|
||||
*
|
||||
* @param int $idx
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\VindexesEntry
|
||||
*/
|
||||
public function getVindexes($idx = NULL){
|
||||
return $this->_get(2, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <vindexes> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Keyspace\VindexesEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function setVindexes(\Vitess\Proto\Vschema\Keyspace\VindexesEntry $value, $idx = NULL){
|
||||
return $this->_set(2, $value, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all elements of <vindexes>
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\VindexesEntry[]
|
||||
*/
|
||||
public function getVindexesList(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new element to <vindexes>
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Keyspace\VindexesEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function addVindexes(\Vitess\Proto\Vschema\Keyspace\VindexesEntry $value){
|
||||
return $this->_add(2, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <tables> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasTables(){
|
||||
return $this->_has(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <tables> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function clearTables(){
|
||||
return $this->_clear(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <tables> value
|
||||
*
|
||||
* @param int $idx
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\TablesEntry
|
||||
*/
|
||||
public function getTables($idx = NULL){
|
||||
return $this->_get(3, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <tables> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Keyspace\TablesEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function setTables(\Vitess\Proto\Vschema\Keyspace\TablesEntry $value, $idx = NULL){
|
||||
return $this->_set(3, $value, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all elements of <tables>
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\TablesEntry[]
|
||||
*/
|
||||
public function getTablesList(){
|
||||
return $this->_get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new element to <tables>
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Keyspace\TablesEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace
|
||||
*/
|
||||
public function addTables(\Vitess\Proto\Vschema\Keyspace\TablesEntry $value){
|
||||
return $this->_add(3, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema\Keyspace {
|
||||
|
||||
class TablesEntry extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $key = null;
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\Table */
|
||||
public $value = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Keyspace.TablesEntry');
|
||||
|
||||
// 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 MESSAGE value = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "value";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$f->reference = '\Vitess\Proto\Vschema\Table';
|
||||
$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\Vschema\Keyspace\TablesEntry
|
||||
*/
|
||||
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\Vschema\Keyspace\TablesEntry
|
||||
*/
|
||||
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\Vschema\Keyspace\TablesEntry
|
||||
*/
|
||||
public function clearValue(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <value> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function getValue(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <value> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Table $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\TablesEntry
|
||||
*/
|
||||
public function setValue(\Vitess\Proto\Vschema\Table $value){
|
||||
return $this->_set(2, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema\Keyspace {
|
||||
|
||||
class VindexesEntry extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $key = null;
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\Vindex */
|
||||
public $value = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Keyspace.VindexesEntry');
|
||||
|
||||
// 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 MESSAGE value = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "value";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$f->reference = '\Vitess\Proto\Vschema\Vindex';
|
||||
$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\Vschema\Keyspace\VindexesEntry
|
||||
*/
|
||||
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\Vschema\Keyspace\VindexesEntry
|
||||
*/
|
||||
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\Vschema\Keyspace\VindexesEntry
|
||||
*/
|
||||
public function clearValue(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <value> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function getValue(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <value> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Vindex $value
|
||||
* @return \Vitess\Proto\Vschema\Keyspace\VindexesEntry
|
||||
*/
|
||||
public function setValue(\Vitess\Proto\Vschema\Vindex $value){
|
||||
return $this->_set(2, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema {
|
||||
|
||||
class Table extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $type = null;
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\ColumnVindex[] */
|
||||
public $column_vindexes = array();
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\AutoIncrement */
|
||||
public $auto_increment = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Table');
|
||||
|
||||
// OPTIONAL STRING type = 1
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 1;
|
||||
$f->name = "type";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_STRING;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$descriptor->addField($f);
|
||||
|
||||
// REPEATED MESSAGE column_vindexes = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "column_vindexes";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
|
||||
$f->reference = '\Vitess\Proto\Vschema\ColumnVindex';
|
||||
$descriptor->addField($f);
|
||||
|
||||
// OPTIONAL MESSAGE auto_increment = 3
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 3;
|
||||
$f->name = "auto_increment";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$f->reference = '\Vitess\Proto\Vschema\AutoIncrement';
|
||||
$descriptor->addField($f);
|
||||
|
||||
foreach (self::$__extensions as $cb) {
|
||||
$descriptor->addField($cb(), true);
|
||||
}
|
||||
|
||||
return $descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <type> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasType(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <type> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function clearType(){
|
||||
return $this->_clear(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <type> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(){
|
||||
return $this->_get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <type> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function setType( $value){
|
||||
return $this->_set(1, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <column_vindexes> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasColumnVindexes(){
|
||||
return $this->_has(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <column_vindexes> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function clearColumnVindexes(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <column_vindexes> value
|
||||
*
|
||||
* @param int $idx
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex
|
||||
*/
|
||||
public function getColumnVindexes($idx = NULL){
|
||||
return $this->_get(2, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <column_vindexes> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\ColumnVindex $value
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function setColumnVindexes(\Vitess\Proto\Vschema\ColumnVindex $value, $idx = NULL){
|
||||
return $this->_set(2, $value, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all elements of <column_vindexes>
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\ColumnVindex[]
|
||||
*/
|
||||
public function getColumnVindexesList(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new element to <column_vindexes>
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\ColumnVindex $value
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function addColumnVindexes(\Vitess\Proto\Vschema\ColumnVindex $value){
|
||||
return $this->_add(2, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <auto_increment> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasAutoIncrement(){
|
||||
return $this->_has(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <auto_increment> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function clearAutoIncrement(){
|
||||
return $this->_clear(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <auto_increment> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\AutoIncrement
|
||||
*/
|
||||
public function getAutoIncrement(){
|
||||
return $this->_get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <auto_increment> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\AutoIncrement $value
|
||||
* @return \Vitess\Proto\Vschema\Table
|
||||
*/
|
||||
public function setAutoIncrement(\Vitess\Proto\Vschema\AutoIncrement $value){
|
||||
return $this->_set(3, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema {
|
||||
|
||||
class Vindex extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $type = null;
|
||||
|
||||
/** @var \Vitess\Proto\Vschema\Vindex\ParamsEntry[] */
|
||||
public $params = array();
|
||||
|
||||
/** @var string */
|
||||
public $owner = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Vindex');
|
||||
|
||||
// OPTIONAL STRING type = 1
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 1;
|
||||
$f->name = "type";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_STRING;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
|
||||
$descriptor->addField($f);
|
||||
|
||||
// REPEATED MESSAGE params = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "params";
|
||||
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
|
||||
$f->rule = \DrSlump\Protobuf::RULE_REPEATED;
|
||||
$f->reference = '\Vitess\Proto\Vschema\Vindex\ParamsEntry';
|
||||
$descriptor->addField($f);
|
||||
|
||||
// OPTIONAL STRING owner = 3
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 3;
|
||||
$f->name = "owner";
|
||||
$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 <type> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasType(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <type> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function clearType(){
|
||||
return $this->_clear(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <type> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(){
|
||||
return $this->_get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <type> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function setType( $value){
|
||||
return $this->_set(1, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <params> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasParams(){
|
||||
return $this->_has(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <params> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function clearParams(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <params> value
|
||||
*
|
||||
* @param int $idx
|
||||
* @return \Vitess\Proto\Vschema\Vindex\ParamsEntry
|
||||
*/
|
||||
public function getParams($idx = NULL){
|
||||
return $this->_get(2, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <params> value
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Vindex\ParamsEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function setParams(\Vitess\Proto\Vschema\Vindex\ParamsEntry $value, $idx = NULL){
|
||||
return $this->_set(2, $value, $idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all elements of <params>
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex\ParamsEntry[]
|
||||
*/
|
||||
public function getParamsList(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new element to <params>
|
||||
*
|
||||
* @param \Vitess\Proto\Vschema\Vindex\ParamsEntry $value
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function addParams(\Vitess\Proto\Vschema\Vindex\ParamsEntry $value){
|
||||
return $this->_add(2, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if <owner> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasOwner(){
|
||||
return $this->_has(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <owner> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function clearOwner(){
|
||||
return $this->_clear(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <owner> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOwner(){
|
||||
return $this->_get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <owner> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\Vindex
|
||||
*/
|
||||
public function setOwner( $value){
|
||||
return $this->_set(3, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
|
||||
// Source: vschema.proto
|
||||
|
||||
namespace Vitess\Proto\Vschema\Vindex {
|
||||
|
||||
class ParamsEntry extends \DrSlump\Protobuf\Message {
|
||||
|
||||
/** @var string */
|
||||
public $key = null;
|
||||
|
||||
/** @var string */
|
||||
public $value = null;
|
||||
|
||||
|
||||
/** @var \Closure[] */
|
||||
protected static $__extensions = array();
|
||||
|
||||
public static function descriptor()
|
||||
{
|
||||
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'vschema.Vindex.ParamsEntry');
|
||||
|
||||
// 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 STRING value = 2
|
||||
$f = new \DrSlump\Protobuf\Field();
|
||||
$f->number = 2;
|
||||
$f->name = "value";
|
||||
$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 <key> has a value
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasKey(){
|
||||
return $this->_has(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear <key> value
|
||||
*
|
||||
* @return \Vitess\Proto\Vschema\Vindex\ParamsEntry
|
||||
*/
|
||||
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\Vschema\Vindex\ParamsEntry
|
||||
*/
|
||||
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\Vschema\Vindex\ParamsEntry
|
||||
*/
|
||||
public function clearValue(){
|
||||
return $this->_clear(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get <value> value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue(){
|
||||
return $this->_get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set <value> value
|
||||
*
|
||||
* @param string $value
|
||||
* @return \Vitess\Proto\Vschema\Vindex\ParamsEntry
|
||||
*/
|
||||
public function setValue( $value){
|
||||
return $this->_set(2, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче