PartitionOffsets.php 2.9 KB

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