191 return \google\protobuf\DescriptorProto::fromArray([
194 \google\protobuf\FieldDescriptorProto::fromArray([
196 'name' =>
'incomingMessages',
197 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(),
198 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(),
199 'type_name' =>
'.IncomingMessagesRequest'
201 \google\protobuf\FieldDescriptorProto::fromArray([
203 'name' =>
'channelStats',
204 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(),
205 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(),
206 'type_name' =>
'.ChannelStatsRequest'
208 \google\protobuf\FieldDescriptorProto::fromArray([
210 'name' =>
'serverStats',
211 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(),
212 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(),
213 'type_name' =>
'.ServerStatsRequest'
237 public function writeTo(\Protobuf\WriteContext $context)
239 $stream = $context->getStream();
240 $writer = $context->getWriter();
241 $sizeContext = $context->getComputeSizeContext();
243 if ($this->incomingMessages !==
null) {
244 $writer->writeVarint($stream, 10);
245 $writer->writeVarint($stream, $this->incomingMessages->serializedSize($sizeContext));
246 $this->incomingMessages->writeTo($context);
249 if ($this->channelStats !==
null) {
250 $writer->writeVarint($stream, 18);
251 $writer->writeVarint($stream, $this->channelStats->serializedSize($sizeContext));
252 $this->channelStats->writeTo($context);
255 if ($this->serverStats !==
null) {
256 $writer->writeVarint($stream, 26);
257 $writer->writeVarint($stream, $this->serverStats->serializedSize($sizeContext));
258 $this->serverStats->writeTo($context);
271 public function readFrom(\Protobuf\ReadContext $context)
273 $reader = $context->getReader();
274 $length = $context->getLength();
275 $stream = $context->getStream();
277 $limit = ($length !==
null)
278 ? ($stream->tell() + $length)
281 while ($limit ===
null || $stream->tell() < $limit) {
283 if ($stream->eof()) {
287 $key = $reader->readVarint($stream);
288 $wire = \Protobuf\WireFormat::getTagWireType($key);
289 $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
291 if ($stream->eof()) {
296 \Protobuf\WireFormat::assertWireType($wire, 11);
298 $innerSize = $reader->readVarint($stream);
299 $innerMessage = new \Bitrix\Pull\Protobuf\IncomingMessagesRequest();
301 $this->incomingMessages = $innerMessage;
303 $context->setLength($innerSize);
304 $innerMessage->readFrom($context);
305 $context->setLength($length);
311 \Protobuf\WireFormat::assertWireType($wire, 11);
313 $innerSize = $reader->readVarint($stream);
314 $innerMessage = new \Bitrix\Pull\Protobuf\ChannelStatsRequest();
316 $this->channelStats = $innerMessage;
318 $context->setLength($innerSize);
319 $innerMessage->readFrom($context);
320 $context->setLength($length);
326 \Protobuf\WireFormat::assertWireType($wire, 11);
328 $innerSize = $reader->readVarint($stream);
329 $innerMessage = new \Bitrix\Pull\Protobuf\ServerStatsRequest();
331 $this->serverStats = $innerMessage;
333 $context->setLength($innerSize);
334 $innerMessage->readFrom($context);
335 $context->setLength($length);
343 if ($extension !==
null) {
344 $this->
extensions()->add($extension, $extension->readFrom($context, $wire));
353 $data = $reader->readUnknown($stream, $wire);
354 $unknown = new \Protobuf\Unknown($tag, $wire, $data);
366 $calculator = $context->getSizeCalculator();
369 if ($this->incomingMessages !==
null) {
370 $innerSize = $this->incomingMessages->serializedSize($context);
374 $size += $calculator->computeVarintSize($innerSize);
377 if ($this->channelStats !==
null) {
378 $innerSize = $this->channelStats->serializedSize($context);
382 $size += $calculator->computeVarintSize($innerSize);
385 if ($this->serverStats !==
null) {
386 $innerSize = $this->serverStats->serializedSize($context);
390 $size += $calculator->computeVarintSize($innerSize);
394 $size += $this->
extensions->serializedSize($context);
416 throw new \InvalidArgumentException(sprintf(
'Argument 1 passed to %s must be a %s, %s given', __METHOD__, __CLASS__, get_class($message)));
419 $this->incomingMessages = ($message->incomingMessages !==
null) ? $message->incomingMessages :
$this->incomingMessages;
420 $this->channelStats = ($message->channelStats !==
null) ? $message->channelStats :
$this->channelStats;
421 $this->serverStats = ($message->serverStats !==
null) ? $message->serverStats :
$this->serverStats;