CommitOffsetRequest.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. * Signal for server that client processed some read data.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.CommitOffsetRequest</code>
  12. */
  13. class CommitOffsetRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Partition offsets that indicates processed data.
  17. *
  18. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset commit_offsets = 1;</code>
  19. */
  20. private $commit_offsets;
  21. /**
  22. * Constructor.
  23. *
  24. * @param array $data {
  25. * Optional. Data for populating the Message object.
  26. *
  27. * @type array<\Ydb\Topic\StreamReadMessage\CommitOffsetRequest\PartitionCommitOffset>|\Google\Protobuf\Internal\RepeatedField $commit_offsets
  28. * Partition offsets that indicates processed data.
  29. * }
  30. */
  31. public function __construct($data = NULL) {
  32. \GPBMetadata\Protos\YdbTopic::initOnce();
  33. parent::__construct($data);
  34. }
  35. /**
  36. * Partition offsets that indicates processed data.
  37. *
  38. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset commit_offsets = 1;</code>
  39. * @return \Google\Protobuf\Internal\RepeatedField
  40. */
  41. public function getCommitOffsets()
  42. {
  43. return $this->commit_offsets;
  44. }
  45. /**
  46. * Partition offsets that indicates processed data.
  47. *
  48. * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.CommitOffsetRequest.PartitionCommitOffset commit_offsets = 1;</code>
  49. * @param array<\Ydb\Topic\StreamReadMessage\CommitOffsetRequest\PartitionCommitOffset>|\Google\Protobuf\Internal\RepeatedField $var
  50. * @return $this
  51. */
  52. public function setCommitOffsets($var)
  53. {
  54. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\CommitOffsetRequest\PartitionCommitOffset::class);
  55. $this->commit_offsets = $arr;
  56. return $this;
  57. }
  58. }
  59. // Adding a class alias for backwards compatibility with the previous class name.
  60. class_alias(CommitOffsetRequest::class, \Ydb\Topic\StreamReadMessage_CommitOffsetRequest::class);