|
<?php |
|
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin @package_version@ |
|
// Source: simple.proto |
|
// Date: 2011-07-10 10:05:44 |
|
|
|
// @@protoc_insertion_point(scope_file) |
|
|
|
namespace tests { |
|
|
|
// @@protoc_insertion_point(scope_namespace) |
|
// @@protoc_insertion_point(namespace_tests) |
|
|
|
class Simple extends \DrSlump\Protobuf\Message { |
|
|
|
/** @var \Closure[] */ |
|
protected static $__extensions = array(); |
|
|
|
public static function descriptor() |
|
{ |
|
$descriptor = new \DrSlump\Protobuf\Descriptor('\tests\Simple'); |
|
|
|
// optional double = 1 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 1; |
|
$f->name = "double"; |
|
$f->type = 1; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:double) |
|
$descriptor->addField($f); |
|
|
|
// optional float = 2 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 2; |
|
$f->name = "float"; |
|
$f->type = 2; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:float) |
|
$descriptor->addField($f); |
|
|
|
// optional int64 = 3 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 3; |
|
$f->name = "int64"; |
|
$f->type = 3; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:int64) |
|
$descriptor->addField($f); |
|
|
|
// optional uint64 = 4 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 4; |
|
$f->name = "uint64"; |
|
$f->type = 4; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:uint64) |
|
$descriptor->addField($f); |
|
|
|
// optional int32 = 5 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 5; |
|
$f->name = "int32"; |
|
$f->type = 5; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:int32) |
|
$descriptor->addField($f); |
|
|
|
// optional fixed64 = 6 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 6; |
|
$f->name = "fixed64"; |
|
$f->type = 6; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:fixed64) |
|
$descriptor->addField($f); |
|
|
|
// optional fixed32 = 7 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 7; |
|
$f->name = "fixed32"; |
|
$f->type = 7; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:fixed32) |
|
$descriptor->addField($f); |
|
|
|
// optional bool = 8 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 8; |
|
$f->name = "bool"; |
|
$f->type = 8; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:bool) |
|
$descriptor->addField($f); |
|
|
|
// optional string = 9 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 9; |
|
$f->name = "string"; |
|
$f->type = 9; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:string) |
|
$descriptor->addField($f); |
|
|
|
// optional bytes = 12 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 12; |
|
$f->name = "bytes"; |
|
$f->type = 12; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:bytes) |
|
$descriptor->addField($f); |
|
|
|
// optional uint32 = 13 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 13; |
|
$f->name = "uint32"; |
|
$f->type = 13; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:uint32) |
|
$descriptor->addField($f); |
|
|
|
// optional sfixed32 = 15 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 15; |
|
$f->name = "sfixed32"; |
|
$f->type = 15; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:sfixed32) |
|
$descriptor->addField($f); |
|
|
|
// optional sfixed64 = 16 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 16; |
|
$f->name = "sfixed64"; |
|
$f->type = 16; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:sfixed64) |
|
$descriptor->addField($f); |
|
|
|
// optional sint32 = 17 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 17; |
|
$f->name = "sint32"; |
|
$f->type = 17; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:sint32) |
|
$descriptor->addField($f); |
|
|
|
// optional sint64 = 18 |
|
$f = new \DrSlump\Protobuf\Field(); |
|
$f->number = 18; |
|
$f->name = "sint64"; |
|
$f->type = 18; |
|
$f->rule = 1; |
|
// @@protoc_insertion_point(scope_field) |
|
// @@protoc_insertion_point(field_tests.Simple:sint64) |
|
$descriptor->addField($f); |
|
|
|
foreach (self::$__extensions as $cb) { |
|
$descriptor->addField($cb(), true); |
|
} |
|
|
|
// @@protoc_insertion_point(scope_descriptor) |
|
// @@protoc_insertion_point(descriptor_tests.Simple) |
|
|
|
return $descriptor; |
|
} |
|
|
|
/** @var float */ |
|
public $double = null; |
|
|
|
/** @var float */ |
|
public $float = null; |
|
|
|
/** @var int */ |
|
public $int64 = null; |
|
|
|
/** @var int */ |
|
public $uint64 = null; |
|
|
|
/** @var int */ |
|
public $int32 = null; |
|
|
|
/** @var int */ |
|
public $fixed64 = null; |
|
|
|
/** @var int */ |
|
public $fixed32 = null; |
|
|
|
/** @var boolean */ |
|
public $bool = null; |
|
|
|
/** @var string */ |
|
public $string = null; |
|
|
|
/** @var string */ |
|
public $bytes = null; |
|
|
|
/** @var int */ |
|
public $uint32 = null; |
|
|
|
/** @var int */ |
|
public $sfixed32 = null; |
|
|
|
/** @var int */ |
|
public $sfixed64 = null; |
|
|
|
/** @var int */ |
|
public $sint32 = null; |
|
|
|
/** @var int */ |
|
public $sint64 = null; |
|
|
|
|
|
/** |
|
* Check if <double> has a value |
|
* |
|
* @return boolean |
|
*/ |
|
public function hasDouble(){ |
|
return $this->_has(1); |
|
} |
|
|
|
/** |
|
* Clear <double> value |
|
* |
|
* @return \tests\Simple |
|
*/ |
|
public function clearDouble(){ |
|
return $this->_clear(1); |
|
} |
|
|
|
/** |
|
* Get <double> value |
|
* |
|
* @return float |
|
*/ |
|
public function getDouble(){ |
|
return $this->_get(1); |
|
} |
|
|
|
/** |
|
* Set <double> value |
|
* |
|
* @param float $value |
|
* @return \tests\Simple |
|
*/ |
|
public function setDouble( $value){ |
|
return $this->_set(1, $value); |
|
} |
|
|
|
/** |
|
* Check if <float> has a value |
|
* |
|
* @return boolean |
|
*/ |
|
public function hasFloat(){ |
|
return $this->_has(2); |
|
} |
|
|
|
/** |
|
* Clear <float> value |
|
* |
|
* @return \tests\Simple |
|
*/ |
|
public function clearFloat(){ |
|
return $this->_clear(2); |
|
} |
|
|
|
/** |
|
* Get <float> value |
|
* |
|
* @return float |
|
*/ |
|
public function getFloat(){ |
|
return $this->_get(2); |
|
} |
|
|
|
/** |
|
* Set <float> value |
|
* |
|
* @param float $value |
|
* @return \tests\Simple |
|
*/ |
|
public function setFloat( $value){ |
|
return $this->_set(2, $value); |
|
} |
|
|
|
/** |
|
* Check if <int64> has a value |
|
* |
|
* @return boolean |
|
*/ |
|
public function hasInt64(){ |
|
return $this->_has(3); |
|
} |
|
|
|
/** |
|
* Clear <int64> value |
|
* |
|
* @return \tests\Simple |
|
*/ |
|
public function clearInt64(){ |
|
return $this->_clear(3); |
|
} |
|
|
|
/** |
|
* Get <int64> value |
|
* |
|
* @return int |
|
*/ |
|
public function getInt64(){ |
|
return $this->_get(3); |
|
} |
|
|
|
/** |
|
* Set <int64> value |
|
* |
|
* @param int $value |
|
* @return \tests\Simple |
|
*/ |
|
public function setInt64( $value){ |
|
return $this->_set(3, $value); |
|
} |
|
|
|
/** |
|
* Check if <uint64> has a value |
|
* |
|
* @return boolean |
|
*/ |
|
public function hasUint64(){ |
|
return $this->_has(4); |
|
} |
|
|
|
/** |
|
* Clear <uint64> value |
|
* |
|
* @return \tests\Simple |
|
*/ |
|
public function clearUint64(){ |
|
return $this->_clear(4); |
|
} |
|
|
|
/** |
|
* Get <uint64> value |
|
* |
|
* @return int |
|
*/ |
|
public function getUint64(){ |
|
return $this->_get(4); |
|
} |
|
|
|
/** |
|
* Set <uint64> value |
|
* |
|
* @param int $value |
|
* @return \tests\Simple |
|
*/ |
|
public function setUint64( $value){ |
|
return $this->_set(4, $value); |
|
} |
|
|
|
/** |
|
* Check if <int32> has a value |
|
* |
|
* @return boolean |
|
*/ |
|
public function hasInt32(){ |
|
return $this->_has(5); |
|
} |
|
|
|
/** |
|
* Clear <int32> value |
|
* |
|
* @return \tests\Simple |
|
*/ |
|
public function clearInt32(){ |
|
return $this->_clear(5); |
|
} |
|
|
|
/** |
|
* Get <int32> value |
|
* |
|
* @return int |
|
*/ |
|
public function getInt32(){ |
&n |