TopicOffsets.php 3.0 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;
  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</code>
  10. */
  11. class TopicOffsets extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Topic path.
  15. *
  16. * Generated from protobuf field <code>string path = 1;</code>
  17. */
  18. protected $path = '';
  19. /**
  20. * Ranges of offsets by partitions.
  21. *
  22. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;</code>
  23. */
  24. private $partitions;
  25. /**
  26. * Constructor.
  27. *
  28. * @param array $data {
  29. * Optional. Data for populating the Message object.
  30. *
  31. * @type string $path
  32. * Topic path.
  33. * @type array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets>|\Google\Protobuf\Internal\RepeatedField $partitions
  34. * Ranges of offsets by partitions.
  35. * }
  36. */
  37. public function __construct($data = NULL) {
  38. \GPBMetadata\Protos\YdbTopic::initOnce();
  39. parent::__construct($data);
  40. }
  41. /**
  42. * Topic path.
  43. *
  44. * Generated from protobuf field <code>string path = 1;</code>
  45. * @return string
  46. */
  47. public function getPath()
  48. {
  49. return $this->path;
  50. }
  51. /**
  52. * Topic path.
  53. *
  54. * Generated from protobuf field <code>string path = 1;</code>
  55. * @param string $var
  56. * @return $this
  57. */
  58. public function setPath($var)
  59. {
  60. GPBUtil::checkString($var, True);
  61. $this->path = $var;
  62. return $this;
  63. }
  64. /**
  65. * Ranges of offsets by partitions.
  66. *
  67. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;</code>
  68. * @return \Google\Protobuf\Internal\RepeatedField
  69. */
  70. public function getPartitions()
  71. {
  72. return $this->partitions;
  73. }
  74. /**
  75. * Ranges of offsets by partitions.
  76. *
  77. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;</code>
  78. * @param array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets>|\Google\Protobuf\Internal\RepeatedField $var
  79. * @return $this
  80. */
  81. public function setPartitions($var)
  82. {
  83. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets::class);
  84. $this->partitions = $arr;
  85. return $this;
  86. }
  87. }
  88. // Adding a class alias for backwards compatibility with the previous class name.
  89. class_alias(TopicOffsets::class, \Ydb\Topic\AddOffsetsToTransactionRequest_TopicOffsets::class);