|
| 1 | +<?php |
| 2 | +namespace pecl\protocolbuffers; |
| 3 | + |
| 4 | +// @@protoc_insertion_point(namespace:.pecl.protocolbuffers.User) |
| 5 | + |
| 6 | +/** |
| 7 | + * Generated by the protocol buffer compiler. DO NOT EDIT! |
| 8 | + * source: proto/user.proto |
| 9 | + * |
| 10 | + * -*- magic methods -*- |
| 11 | + * |
| 12 | + * @method string getUserId() |
| 13 | + * @method void setUserId(string $value) |
| 14 | + * @method string getName() |
| 15 | + * @method void setName(string $value) |
| 16 | + */ |
| 17 | +class User extends \ProtocolBuffers\Message |
| 18 | +{ |
| 19 | + // @@protoc_insertion_point(traits:.pecl.protocolbuffers.User) |
| 20 | + |
| 21 | + /** |
| 22 | + * @var string $user_id |
| 23 | + * @tag 1 |
| 24 | + * @label optional |
| 25 | + * @type \ProtocolBuffers::TYPE_INT64 |
| 26 | + **/ |
| 27 | + protected $user_id; |
| 28 | + |
| 29 | + /** |
| 30 | + * @var string $name |
| 31 | + * @tag 2 |
| 32 | + * @label optional |
| 33 | + * @type \ProtocolBuffers::TYPE_BYTES |
| 34 | + **/ |
| 35 | + protected $name; |
| 36 | + |
| 37 | + |
| 38 | + // @@protoc_insertion_point(properties_scope:.pecl.protocolbuffers.User) |
| 39 | + |
| 40 | + // @@protoc_insertion_point(class_scope:.pecl.protocolbuffers.User) |
| 41 | + |
| 42 | + /** |
| 43 | + * get descriptor for protocol buffers |
| 44 | + * |
| 45 | + * @return \ProtocolBuffersDescriptor |
| 46 | + */ |
| 47 | + public static function getDescriptor() |
| 48 | + { |
| 49 | + static $descriptor; |
| 50 | + |
| 51 | + if (!isset($descriptor)) { |
| 52 | + $desc = new \ProtocolBuffers\DescriptorBuilder(); |
| 53 | + $desc->addField(1, new \ProtocolBuffers\FieldDescriptor(array( |
| 54 | + "type" => \ProtocolBuffers::TYPE_INT64, |
| 55 | + "name" => "user_id", |
| 56 | + "required" => false, |
| 57 | + "optional" => true, |
| 58 | + "repeated" => false, |
| 59 | + "packable" => false, |
| 60 | + "default" => null, |
| 61 | + ))); |
| 62 | + $desc->addField(2, new \ProtocolBuffers\FieldDescriptor(array( |
| 63 | + "type" => \ProtocolBuffers::TYPE_BYTES, |
| 64 | + "name" => "name", |
| 65 | + "required" => false, |
| 66 | + "optional" => true, |
| 67 | + "repeated" => false, |
| 68 | + "packable" => false, |
| 69 | + "default" => null, |
| 70 | + ))); |
| 71 | + // @@protoc_insertion_point(builder_scope:.pecl.protocolbuffers.User) |
| 72 | + |
| 73 | + $descriptor = $desc->build(); |
| 74 | + } |
| 75 | + return $descriptor; |
| 76 | + } |
| 77 | + |
| 78 | +} |
0 commit comments