WriteAck.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamWriteMessage\WriteResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Acknowledgment for one persistently written message.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck</code>
  12. */
  13. class WriteAck extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Sequence number as in WriteRequest.
  17. *
  18. * Generated from protobuf field <code>int64 seq_no = 1;</code>
  19. */
  20. protected $seq_no = 0;
  21. protected $message_write_status;
  22. /**
  23. * Constructor.
  24. *
  25. * @param array $data {
  26. * Optional. Data for populating the Message object.
  27. *
  28. * @type int|string $seq_no
  29. * Sequence number as in WriteRequest.
  30. * @type \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written $written
  31. * @type \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped $skipped
  32. * }
  33. */
  34. public function __construct($data = NULL) {
  35. \GPBMetadata\Protos\YdbTopic::initOnce();
  36. parent::__construct($data);
  37. }
  38. /**
  39. * Sequence number as in WriteRequest.
  40. *
  41. * Generated from protobuf field <code>int64 seq_no = 1;</code>
  42. * @return int|string
  43. */
  44. public function getSeqNo()
  45. {
  46. return $this->seq_no;
  47. }
  48. /**
  49. * Sequence number as in WriteRequest.
  50. *
  51. * Generated from protobuf field <code>int64 seq_no = 1;</code>
  52. * @param int|string $var
  53. * @return $this
  54. */
  55. public function setSeqNo($var)
  56. {
  57. GPBUtil::checkInt64($var);
  58. $this->seq_no = $var;
  59. return $this;
  60. }
  61. /**
  62. * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Written written = 2;</code>
  63. * @return \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written|null
  64. */
  65. public function getWritten()
  66. {
  67. return $this->readOneof(2);
  68. }
  69. public function hasWritten()
  70. {
  71. return $this->hasOneof(2);
  72. }
  73. /**
  74. * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Written written = 2;</code>
  75. * @param \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written $var
  76. * @return $this
  77. */
  78. public function setWritten($var)
  79. {
  80. GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written::class);
  81. $this->writeOneof(2, $var);
  82. return $this;
  83. }
  84. /**
  85. * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped skipped = 3;</code>
  86. * @return \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped|null
  87. */
  88. public function getSkipped()
  89. {
  90. return $this->readOneof(3);
  91. }
  92. public function hasSkipped()
  93. {
  94. return $this->hasOneof(3);
  95. }
  96. /**
  97. * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped skipped = 3;</code>
  98. * @param \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped $var
  99. * @return $this
  100. */
  101. public function setSkipped($var)
  102. {
  103. GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped::class);
  104. $this->writeOneof(3, $var);
  105. return $this;
  106. }
  107. /**
  108. * @return string
  109. */
  110. public function getMessageWriteStatus()
  111. {
  112. return $this->whichOneof("message_write_status");
  113. }
  114. }
  115. // Adding a class alias for backwards compatibility with the previous class name.
  116. class_alias(WriteAck::class, \Ydb\Topic\StreamWriteMessage_WriteResponse_WriteAck::class);