PartitionSession.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. * Within a StreamRead session delivered messages are separated by partition.
  10. * Reads from a single partition are represented by a partition session.
  11. *
  12. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.PartitionSession</code>
  13. */
  14. class PartitionSession extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Identitifier of partition session. Unique inside one RPC call.
  18. *
  19. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  20. */
  21. protected $partition_session_id = 0;
  22. /**
  23. * Topic path of partition.
  24. *
  25. * Generated from protobuf field <code>string path = 2;</code>
  26. */
  27. protected $path = '';
  28. /**
  29. * Partition identifier.
  30. *
  31. * Generated from protobuf field <code>int64 partition_id = 3;</code>
  32. */
  33. protected $partition_id = 0;
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type int|string $partition_session_id
  41. * Identitifier of partition session. Unique inside one RPC call.
  42. * @type string $path
  43. * Topic path of partition.
  44. * @type int|string $partition_id
  45. * Partition identifier.
  46. * }
  47. */
  48. public function __construct($data = NULL) {
  49. \GPBMetadata\Protos\YdbTopic::initOnce();
  50. parent::__construct($data);
  51. }
  52. /**
  53. * Identitifier of partition session. Unique inside one RPC call.
  54. *
  55. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  56. * @return int|string
  57. */
  58. public function getPartitionSessionId()
  59. {
  60. return $this->partition_session_id;
  61. }
  62. /**
  63. * Identitifier of partition session. Unique inside one RPC call.
  64. *
  65. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  66. * @param int|string $var
  67. * @return $this
  68. */
  69. public function setPartitionSessionId($var)
  70. {
  71. GPBUtil::checkInt64($var);
  72. $this->partition_session_id = $var;
  73. return $this;
  74. }
  75. /**
  76. * Topic path of partition.
  77. *
  78. * Generated from protobuf field <code>string path = 2;</code>
  79. * @return string
  80. */
  81. public function getPath()
  82. {
  83. return $this->path;
  84. }
  85. /**
  86. * Topic path of partition.
  87. *
  88. * Generated from protobuf field <code>string path = 2;</code>
  89. * @param string $var
  90. * @return $this
  91. */
  92. public function setPath($var)
  93. {
  94. GPBUtil::checkString($var, True);
  95. $this->path = $var;
  96. return $this;
  97. }
  98. /**
  99. * Partition identifier.
  100. *
  101. * Generated from protobuf field <code>int64 partition_id = 3;</code>
  102. * @return int|string
  103. */
  104. public function getPartitionId()
  105. {
  106. return $this->partition_id;
  107. }
  108. /**
  109. * Partition identifier.
  110. *
  111. * Generated from protobuf field <code>int64 partition_id = 3;</code>
  112. * @param int|string $var
  113. * @return $this
  114. */
  115. public function setPartitionId($var)
  116. {
  117. GPBUtil::checkInt64($var);
  118. $this->partition_id = $var;
  119. return $this;
  120. }
  121. }
  122. // Adding a class alias for backwards compatibility with the previous class name.
  123. class_alias(PartitionSession::class, \Ydb\Topic\StreamReadMessage_PartitionSession::class);