PartitionData.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamReadMessage\ReadResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Representation of sequence of messages from one partition.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.ReadResponse.PartitionData</code>
  12. */
  13. class PartitionData extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  17. */
  18. protected $partition_session_id = 0;
  19. /**
  20. * Client messages, divided by write sessions.
  21. *
  22. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.Batch batches = 2;</code>
  23. */
  24. private $batches;
  25. /**
  26. * Constructor.
  27. *
  28. * @param array $data {
  29. * Optional. Data for populating the Message object.
  30. *
  31. * @type int|string $partition_session_id
  32. * @type array<\Ydb\Topic\StreamReadMessage\ReadResponse\Batch>|\Google\Protobuf\Internal\RepeatedField $batches
  33. * Client messages, divided by write sessions.
  34. * }
  35. */
  36. public function __construct($data = NULL) {
  37. \GPBMetadata\Protos\YdbTopic::initOnce();
  38. parent::__construct($data);
  39. }
  40. /**
  41. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  42. * @return int|string
  43. */
  44. public function getPartitionSessionId()
  45. {
  46. return $this->partition_session_id;
  47. }
  48. /**
  49. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  50. * @param int|string $var
  51. * @return $this
  52. */
  53. public function setPartitionSessionId($var)
  54. {
  55. GPBUtil::checkInt64($var);
  56. $this->partition_session_id = $var;
  57. return $this;
  58. }
  59. /**
  60. * Client messages, divided by write sessions.
  61. *
  62. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.Batch batches = 2;</code>
  63. * @return \Google\Protobuf\Internal\RepeatedField
  64. */
  65. public function getBatches()
  66. {
  67. return $this->batches;
  68. }
  69. /**
  70. * Client messages, divided by write sessions.
  71. *
  72. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.Batch batches = 2;</code>
  73. * @param array<\Ydb\Topic\StreamReadMessage\ReadResponse\Batch>|\Google\Protobuf\Internal\RepeatedField $var
  74. * @return $this
  75. */
  76. public function setBatches($var)
  77. {
  78. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\ReadResponse\Batch::class);
  79. $this->batches = $arr;
  80. return $this;
  81. }
  82. }
  83. // Adding a class alias for backwards compatibility with the previous class name.
  84. class_alias(PartitionData::class, \Ydb\Topic\StreamReadMessage_ReadResponse_PartitionData::class);