public function size() { $size = 0; if (!is_null($this->logs_)) { foreach ($this->logs_ as $v) { $l = $v->size(); $size += 1 + Protobuf::size_varint($l) + $l; } } if (!is_null($this->reserved_)) { $l = strlen($this->reserved_); $size += 1 + Protobuf::size_varint($l) + $l; } if (!is_null($this->topic_)) { $l = strlen($this->topic_); $size += 1 + Protobuf::size_varint($l) + $l; } if (!is_null($this->source_)) { $l = strlen($this->source_); $size += 1 + Protobuf::size_varint($l) + $l; } return $size; }
public function size() { $size = 0; if (!is_null($this->key_)) { $l = strlen($this->key_); $size += 1 + Protobuf::size_varint($l) + $l; } if (!is_null($this->value_)) { $l = strlen($this->value_); $size += 1 + Protobuf::size_varint($l) + $l; } return $size; }
public function size() { $size = 0; if (!is_null($this->time_)) { $size += 1 + Protobuf::size_varint($this->time_); } if (!is_null($this->contents_)) { foreach ($this->contents_ as $v) { $l = $v->size(); $size += 1 + Protobuf::size_varint($l) + $l; } } return $size; }