195 return \google\protobuf\DescriptorProto::fromArray([
196 'name' =>
'ChannelStats',
198 \google\protobuf\FieldDescriptorProto::fromArray([
202 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
204 \google\protobuf\FieldDescriptorProto::fromArray([
206 'name' =>
'isPrivate',
207 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(),
208 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
210 \google\protobuf\FieldDescriptorProto::fromArray([
212 'name' =>
'isOnline',
213 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(),
214 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()
238 public function writeTo(\Protobuf\WriteContext $context)
240 $stream = $context->getStream();
241 $writer = $context->getWriter();
242 $sizeContext = $context->getComputeSizeContext();
244 if ($this->
id !==
null) {
245 $writer->writeVarint($stream, 10);
246 $writer->writeByteStream($stream, $this->
id);
249 if ($this->isPrivate !==
null) {
250 $writer->writeVarint($stream, 16);
251 $writer->writeBool($stream, $this->isPrivate);
254 if ($this->isOnline !==
null) {
255 $writer->writeVarint($stream, 24);
256 $writer->writeBool($stream, $this->isOnline);
269 public function readFrom(\Protobuf\ReadContext $context)
271 $reader = $context->getReader();
272 $length = $context->getLength();
273 $stream = $context->getStream();
275 $limit = ($length !==
null)
276 ? ($stream->tell() + $length)
279 while ($limit ===
null || $stream->tell() < $limit) {
281 if ($stream->eof()) {
285 $key = $reader->readVarint($stream);
286 $wire = \Protobuf\WireFormat::getTagWireType($key);
287 $tag = \Protobuf\WireFormat::getTagFieldNumber($key);
289 if ($stream->eof()) {
294 \Protobuf\WireFormat::assertWireType($wire, 12);
296 $this->
id = $reader->readByteStream($stream);
302 \Protobuf\WireFormat::assertWireType($wire, 8);
304 $this->isPrivate = $reader->readBool($stream);
310 \Protobuf\WireFormat::assertWireType($wire, 8);
312 $this->isOnline = $reader->readBool($stream);
320 if ($extension !==
null) {
321 $this->
extensions()->add($extension, $extension->readFrom($context, $wire));
330 $data = $reader->readUnknown($stream, $wire);
331 $unknown = new \Protobuf\Unknown($tag, $wire, $data);
384 throw new \InvalidArgumentException(sprintf(
'Argument 1 passed to %s must be a %s, %s given', __METHOD__, __CLASS__, get_class($message)));
387 $this->
id = ($message->id !==
null) ? $message->id :
$this->id;
388 $this->isPrivate = ($message->isPrivate !==
null) ? $message->isPrivate :
$this->isPrivate;
389 $this->isOnline = ($message->isOnline !==
null) ? $message->isOnline :
$this->isOnline;