PartitionCommittedOffset.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamReadMessage\CommitOffsetResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Per-partition commit representation.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.CommitOffsetResponse.PartitionCommittedOffset</code>
  12. */
  13. class PartitionCommittedOffset extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Partition session identifier.
  17. *
  18. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  19. */
  20. protected $partition_session_id = 0;
  21. /**
  22. * Upper bound for committed offsets.
  23. *
  24. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  25. */
  26. protected $committed_offset = 0;
  27. /**
  28. * Constructor.
  29. *
  30. * @param array $data {
  31. * Optional. Data for populating the Message object.
  32. *
  33. * @type int|string $partition_session_id
  34. * Partition session identifier.
  35. * @type int|string $committed_offset
  36. * Upper bound for committed offsets.
  37. * }
  38. */
  39. public function __construct($data = NULL) {
  40. \GPBMetadata\Protos\YdbTopic::initOnce();
  41. parent::__construct($data);
  42. }
  43. /**
  44. * Partition session identifier.
  45. *
  46. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  47. * @return int|string
  48. */
  49. public function getPartitionSessionId()
  50. {
  51. return $this->partition_session_id;
  52. }
  53. /**
  54. * Partition session identifier.
  55. *
  56. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  57. * @param int|string $var
  58. * @return $this
  59. */
  60. public function setPartitionSessionId($var)
  61. {
  62. GPBUtil::checkInt64($var);
  63. $this->partition_session_id = $var;
  64. return $this;
  65. }
  66. /**
  67. * Upper bound for committed offsets.
  68. *
  69. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  70. * @return int|string
  71. */
  72. public function getCommittedOffset()
  73. {
  74. return $this->committed_offset;
  75. }
  76. /**
  77. * Upper bound for committed offsets.
  78. *
  79. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  80. * @param int|string $var
  81. * @return $this
  82. */
  83. public function setCommittedOffset($var)
  84. {
  85. GPBUtil::checkInt64($var);
  86. $this->committed_offset = $var;
  87. return $this;
  88. }
  89. }
  90. // Adding a class alias for backwards compatibility with the previous class name.
  91. class_alias(PartitionCommittedOffset::class, \Ydb\Topic\StreamReadMessage_CommitOffsetResponse_PartitionCommittedOffset::class);