SessionStart.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_coordination.proto
  4. namespace Ydb\Coordination\SessionRequest;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. **
  10. * First message used to start/restore a session
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionRequest.SessionStart</code>
  13. */
  14. class SessionStart extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Path to a coordination node
  18. *
  19. * Generated from protobuf field <code>string path = 1;</code>
  20. */
  21. protected $path = '';
  22. /**
  23. * Non-zero when restoring a session, 0 when creating a new session
  24. *
  25. * Generated from protobuf field <code>uint64 session_id = 2;</code>
  26. */
  27. protected $session_id = 0;
  28. /**
  29. * Timeout in milliseconds during which client may restore a detached session
  30. *
  31. * Generated from protobuf field <code>uint64 timeout_millis = 3;</code>
  32. */
  33. protected $timeout_millis = 0;
  34. /**
  35. * User-defined description that may be used to describe the client
  36. *
  37. * Generated from protobuf field <code>string description = 4;</code>
  38. */
  39. protected $description = '';
  40. /**
  41. * Monotonically increasing sequence number generated by the client
  42. * When concurrent SessionStart requests are detected the one with
  43. * the biggest sequence number will succeed
  44. *
  45. * Generated from protobuf field <code>uint64 seq_no = 5;</code>
  46. */
  47. protected $seq_no = 0;
  48. /**
  49. * Random bytes used to protect session from restore by other clients (max. 16 bytes)
  50. *
  51. * Generated from protobuf field <code>bytes protection_key = 6;</code>
  52. */
  53. protected $protection_key = '';
  54. /**
  55. * Constructor.
  56. *
  57. * @param array $data {
  58. * Optional. Data for populating the Message object.
  59. *
  60. * @type string $path
  61. * Path to a coordination node
  62. * @type int|string $session_id
  63. * Non-zero when restoring a session, 0 when creating a new session
  64. * @type int|string $timeout_millis
  65. * Timeout in milliseconds during which client may restore a detached session
  66. * @type string $description
  67. * User-defined description that may be used to describe the client
  68. * @type int|string $seq_no
  69. * Monotonically increasing sequence number generated by the client
  70. * When concurrent SessionStart requests are detected the one with
  71. * the biggest sequence number will succeed
  72. * @type string $protection_key
  73. * Random bytes used to protect session from restore by other clients (max. 16 bytes)
  74. * }
  75. */
  76. public function __construct($data = NULL) {
  77. \GPBMetadata\Protos\YdbCoordination::initOnce();
  78. parent::__construct($data);
  79. }
  80. /**
  81. * Path to a coordination node
  82. *
  83. * Generated from protobuf field <code>string path = 1;</code>
  84. * @return string
  85. */
  86. public function getPath()
  87. {
  88. return $this->path;
  89. }
  90. /**
  91. * Path to a coordination node
  92. *
  93. * Generated from protobuf field <code>string path = 1;</code>
  94. * @param string $var
  95. * @return $this
  96. */
  97. public function setPath($var)
  98. {
  99. GPBUtil::checkString($var, True);
  100. $this->path = $var;
  101. return $this;
  102. }
  103. /**
  104. * Non-zero when restoring a session, 0 when creating a new session
  105. *
  106. * Generated from protobuf field <code>uint64 session_id = 2;</code>
  107. * @return int|string
  108. */
  109. public function getSessionId()
  110. {
  111. return $this->session_id;
  112. }
  113. /**
  114. * Non-zero when restoring a session, 0 when creating a new session
  115. *
  116. * Generated from protobuf field <code>uint64 session_id = 2;</code>
  117. * @param int|string $var
  118. * @return $this
  119. */
  120. public function setSessionId($var)
  121. {
  122. GPBUtil::checkUint64($var);
  123. $this->session_id = $var;
  124. return $this;
  125. }
  126. /**
  127. * Timeout in milliseconds during which client may restore a detached session
  128. *
  129. * Generated from protobuf field <code>uint64 timeout_millis = 3;</code>
  130. * @return int|string
  131. */
  132. public function getTimeoutMillis()
  133. {
  134. return $this->timeout_millis;
  135. }
  136. /**
  137. * Timeout in milliseconds during which client may restore a detached session
  138. *
  139. * Generated from protobuf field <code>uint64 timeout_millis = 3;</code>
  140. * @param int|string $var
  141. * @return $this
  142. */
  143. public function setTimeoutMillis($var)
  144. {
  145. GPBUtil::checkUint64($var);
  146. $this->timeout_millis = $var;
  147. return $this;
  148. }
  149. /**
  150. * User-defined description that may be used to describe the client
  151. *
  152. * Generated from protobuf field <code>string description = 4;</code>
  153. * @return string
  154. */
  155. public function getDescription()
  156. {
  157. return $this->description;
  158. }
  159. /**
  160. * User-defined description that may be used to describe the client
  161. *
  162. * Generated from protobuf field <code>string description = 4;</code>
  163. * @param string $var
  164. * @return $this
  165. */
  166. public function setDescription($var)
  167. {
  168. GPBUtil::checkString($var, True);
  169. $this->description = $var;
  170. return $this;
  171. }
  172. /**
  173. * Monotonically increasing sequence number generated by the client
  174. * When concurrent SessionStart requests are detected the one with
  175. * the biggest sequence number will succeed
  176. *
  177. * Generated from protobuf field <code>uint64 seq_no = 5;</code>
  178. * @return int|string
  179. */
  180. public function getSeqNo()
  181. {
  182. return $this->seq_no;
  183. }
  184. /**
  185. * Monotonically increasing sequence number generated by the client
  186. * When concurrent SessionStart requests are detected the one with
  187. * the biggest sequence number will succeed
  188. *
  189. * Generated from protobuf field <code>uint64 seq_no = 5;</code>
  190. * @param int|string $var
  191. * @return $this
  192. */
  193. public function setSeqNo($var)
  194. {
  195. GPBUtil::checkUint64($var);
  196. $this->seq_no = $var;
  197. return $this;
  198. }
  199. /**
  200. * Random bytes used to protect session from restore by other clients (max. 16 bytes)
  201. *
  202. * Generated from protobuf field <code>bytes protection_key = 6;</code>
  203. * @return string
  204. */
  205. public function getProtectionKey()
  206. {
  207. return $this->protection_key;
  208. }
  209. /**
  210. * Random bytes used to protect session from restore by other clients (max. 16 bytes)
  211. *
  212. * Generated from protobuf field <code>bytes protection_key = 6;</code>
  213. * @param string $var
  214. * @return $this
  215. */
  216. public function setProtectionKey($var)
  217. {
  218. GPBUtil::checkString($var, False);
  219. $this->protection_key = $var;
  220. return $this;
  221. }
  222. }
  223. // Adding a class alias for backwards compatibility with the previous class name.
  224. class_alias(SessionStart::class, \Ydb\Coordination\SessionRequest_SessionStart::class);