SessionDescription.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_coordination.proto
  4. namespace Ydb\Coordination;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. **
  10. * Describes an active client session
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionDescription</code>
  13. */
  14. class SessionDescription extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Session id generated by the server
  18. *
  19. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  20. */
  21. protected $session_id = 0;
  22. /**
  23. * Expiration timeout of the session
  24. *
  25. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  26. */
  27. protected $timeout_millis = 0;
  28. /**
  29. * User-specified description of this session
  30. *
  31. * Generated from protobuf field <code>string description = 3;</code>
  32. */
  33. protected $description = '';
  34. /**
  35. * True if this session is currently attached to a client
  36. *
  37. * Generated from protobuf field <code>bool attached = 4;</code>
  38. */
  39. protected $attached = false;
  40. /**
  41. * Constructor.
  42. *
  43. * @param array $data {
  44. * Optional. Data for populating the Message object.
  45. *
  46. * @type int|string $session_id
  47. * Session id generated by the server
  48. * @type int|string $timeout_millis
  49. * Expiration timeout of the session
  50. * @type string $description
  51. * User-specified description of this session
  52. * @type bool $attached
  53. * True if this session is currently attached to a client
  54. * }
  55. */
  56. public function __construct($data = NULL) {
  57. \GPBMetadata\Protos\YdbCoordination::initOnce();
  58. parent::__construct($data);
  59. }
  60. /**
  61. * Session id generated by the server
  62. *
  63. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  64. * @return int|string
  65. */
  66. public function getSessionId()
  67. {
  68. return $this->session_id;
  69. }
  70. /**
  71. * Session id generated by the server
  72. *
  73. * Generated from protobuf field <code>uint64 session_id = 1;</code>
  74. * @param int|string $var
  75. * @return $this
  76. */
  77. public function setSessionId($var)
  78. {
  79. GPBUtil::checkUint64($var);
  80. $this->session_id = $var;
  81. return $this;
  82. }
  83. /**
  84. * Expiration timeout of the session
  85. *
  86. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  87. * @return int|string
  88. */
  89. public function getTimeoutMillis()
  90. {
  91. return $this->timeout_millis;
  92. }
  93. /**
  94. * Expiration timeout of the session
  95. *
  96. * Generated from protobuf field <code>uint64 timeout_millis = 2;</code>
  97. * @param int|string $var
  98. * @return $this
  99. */
  100. public function setTimeoutMillis($var)
  101. {
  102. GPBUtil::checkUint64($var);
  103. $this->timeout_millis = $var;
  104. return $this;
  105. }
  106. /**
  107. * User-specified description of this session
  108. *
  109. * Generated from protobuf field <code>string description = 3;</code>
  110. * @return string
  111. */
  112. public function getDescription()
  113. {
  114. return $this->description;
  115. }
  116. /**
  117. * User-specified description of this session
  118. *
  119. * Generated from protobuf field <code>string description = 3;</code>
  120. * @param string $var
  121. * @return $this
  122. */
  123. public function setDescription($var)
  124. {
  125. GPBUtil::checkString($var, True);
  126. $this->description = $var;
  127. return $this;
  128. }
  129. /**
  130. * True if this session is currently attached to a client
  131. *
  132. * Generated from protobuf field <code>bool attached = 4;</code>
  133. * @return bool
  134. */
  135. public function getAttached()
  136. {
  137. return $this->attached;
  138. }
  139. /**
  140. * True if this session is currently attached to a client
  141. *
  142. * Generated from protobuf field <code>bool attached = 4;</code>
  143. * @param bool $var
  144. * @return $this
  145. */
  146. public function setAttached($var)
  147. {
  148. GPBUtil::checkBool($var);
  149. $this->attached = $var;
  150. return $this;
  151. }
  152. }