ReadResponse.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamReadMessage;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Data read.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.ReadResponse</code>
  12. */
  13. class ReadResponse extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Client messages, divided by partitions.
  17. *
  18. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData partition_data = 1;</code>
  19. */
  20. private $partition_data;
  21. /**
  22. * Total size in bytes of this response as calculated by server.
  23. * See ReadRequest comment above.
  24. *
  25. * Generated from protobuf field <code>int64 bytes_size = 2;</code>
  26. */
  27. protected $bytes_size = 0;
  28. /**
  29. * Constructor.
  30. *
  31. * @param array $data {
  32. * Optional. Data for populating the Message object.
  33. *
  34. * @type array<\Ydb\Topic\StreamReadMessage\ReadResponse\PartitionData>|\Google\Protobuf\Internal\RepeatedField $partition_data
  35. * Client messages, divided by partitions.
  36. * @type int|string $bytes_size
  37. * Total size in bytes of this response as calculated by server.
  38. * See ReadRequest comment above.
  39. * }
  40. */
  41. public function __construct($data = NULL) {
  42. \GPBMetadata\Protos\YdbTopic::initOnce();
  43. parent::__construct($data);
  44. }
  45. /**
  46. * Client messages, divided by partitions.
  47. *
  48. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData partition_data = 1;</code>
  49. * @return \Google\Protobuf\Internal\RepeatedField
  50. */
  51. public function getPartitionData()
  52. {
  53. return $this->partition_data;
  54. }
  55. /**
  56. * Client messages, divided by partitions.
  57. *
  58. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData partition_data = 1;</code>
  59. * @param array<\Ydb\Topic\StreamReadMessage\ReadResponse\PartitionData>|\Google\Protobuf\Internal\RepeatedField $var
  60. * @return $this
  61. */
  62. public function setPartitionData($var)
  63. {
  64. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\ReadResponse\PartitionData::class);
  65. $this->partition_data = $arr;
  66. return $this;
  67. }
  68. /**
  69. * Total size in bytes of this response as calculated by server.
  70. * See ReadRequest comment above.
  71. *
  72. * Generated from protobuf field <code>int64 bytes_size = 2;</code>
  73. * @return int|string
  74. */
  75. public function getBytesSize()
  76. {
  77. return $this->bytes_size;
  78. }
  79. /**
  80. * Total size in bytes of this response as calculated by server.
  81. * See ReadRequest comment above.
  82. *
  83. * Generated from protobuf field <code>int64 bytes_size = 2;</code>
  84. * @param int|string $var
  85. * @return $this
  86. */
  87. public function setBytesSize($var)
  88. {
  89. GPBUtil::checkInt64($var);
  90. $this->bytes_size = $var;
  91. return $this;
  92. }
  93. }
  94. // Adding a class alias for backwards compatibility with the previous class name.
  95. class_alias(ReadResponse::class, \Ydb\Topic\StreamReadMessage_ReadResponse::class);