286 return \google\protobuf\DescriptorProto::fromArray([
287 'name' =>
'IncomingMessage',
289 \google\protobuf\FieldDescriptorProto::fromArray([
291 'name' =>
'receivers',
292 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(),
293 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(),
294 'type_name' =>
'.Receiver'
296 \google\protobuf\FieldDescriptorProto::fromArray([
299 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(),
300 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(),
301 'type_name' =>
'.Sender'
303 \google\protobuf\FieldDescriptorProto::fromArray([
306 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(),
307 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
309 \google\protobuf\FieldDescriptorProto::fromArray([
312 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_UINT32(),
313 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
315 \google\protobuf\FieldDescriptorProto::fromArray([
318 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(),
319 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
347 $sizeContext =
$context->getComputeSizeContext();
349 if ($this->receivers !==
null) {
350 foreach ($this->receivers as
$val) {
351 $writer->writeVarint($stream, 10);
352 $writer->writeVarint($stream,
$val->serializedSize($sizeContext));
357 if ($this->sender !==
null) {
358 $writer->writeVarint($stream, 18);
359 $writer->writeVarint($stream, $this->sender->serializedSize($sizeContext));
363 if ($this->body !==
null) {
364 $writer->writeVarint($stream, 26);
365 $writer->writeString($stream, $this->body);
368 if ($this->expiry !==
null) {
369 $writer->writeVarint($stream, 32);
370 $writer->writeVarint($stream, $this->expiry);
373 if ($this->type !==
null) {
374 $writer->writeVarint($stream, 42);
375 $writer->writeString($stream, $this->type);
394 $limit = ($length !==
null)
395 ? ($stream->tell() + $length)
398 while ($limit ===
null || $stream->tell() < $limit) {
400 if ($stream->eof()) {
404 $key = $reader->readVarint($stream);
405 $wire = \Protobuf\WireFormat::getTagWireType(
$key);
406 $tag = \Protobuf\WireFormat::getTagFieldNumber(
$key);
408 if ($stream->eof()) {
413 \Protobuf\WireFormat::assertWireType($wire, 11);
415 $innerSize = $reader->readVarint($stream);
416 $innerMessage = new \Bitrix\Pull\Protobuf\Receiver();
418 if ($this->receivers ===
null) {
419 $this->receivers = new \Protobuf\MessageCollection();
422 $this->receivers->add($innerMessage);
432 \Protobuf\WireFormat::assertWireType($wire, 11);
434 $innerSize = $reader->readVarint($stream);
435 $innerMessage = new \Bitrix\Pull\Protobuf\Sender();
437 $this->sender = $innerMessage;
447 \Protobuf\WireFormat::assertWireType($wire, 9);
449 $this->body = $reader->readString($stream);
455 \Protobuf\WireFormat::assertWireType($wire, 13);
457 $this->expiry = $reader->readVarint($stream);
463 \Protobuf\WireFormat::assertWireType($wire, 9);
465 $this->type = $reader->readString($stream);
473 if ($extension !==
null) {
483 $data = $reader->readUnknown($stream, $wire);
484 $unknown = new \Protobuf\Unknown($tag, $wire,
$data);
496 $calculator =
$context->getSizeCalculator();
499 if ($this->receivers !==
null) {
500 foreach ($this->receivers as
$val) {
505 $size += $calculator->computeVarintSize($innerSize);
509 if ($this->sender !==
null) {
510 $innerSize = $this->sender->serializedSize(
$context);
514 $size += $calculator->computeVarintSize($innerSize);
517 if ($this->body !==
null) {
519 $size += $calculator->computeStringSize($this->body);
522 if ($this->expiry !==
null) {
524 $size += $calculator->computeVarintSize($this->expiry);
527 if ($this->type !==
null) {
529 $size += $calculator->computeStringSize($this->type);