DescribeSemaphore.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. * Used to describe semaphores and watch them for changes
  11. * WARNING: a describe operation will cancel previous watches on the same semaphore
  12. *
  13. * Generated from protobuf message <code>Ydb.Coordination.SessionRequest.DescribeSemaphore</code>
  14. */
  15. class DescribeSemaphore extends \Google\Protobuf\Internal\Message
  16. {
  17. /**
  18. * Client-defined request id, echoed in the response
  19. *
  20. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  21. */
  22. protected $req_id = 0;
  23. /**
  24. * Name of the semaphore to describe
  25. *
  26. * Generated from protobuf field <code>string name = 2;</code>
  27. */
  28. protected $name = '';
  29. /**
  30. * Response will include owners list if true
  31. *
  32. * Generated from protobuf field <code>bool include_owners = 3;</code>
  33. */
  34. protected $include_owners = false;
  35. /**
  36. * Response will include waiters list if true
  37. *
  38. * Generated from protobuf field <code>bool include_waiters = 4;</code>
  39. */
  40. protected $include_waiters = false;
  41. /**
  42. * Watch for changes in semaphore data
  43. *
  44. * Generated from protobuf field <code>bool watch_data = 5;</code>
  45. */
  46. protected $watch_data = false;
  47. /**
  48. * Watch for changes in semaphore owners (including owners data)
  49. *
  50. * Generated from protobuf field <code>bool watch_owners = 6;</code>
  51. */
  52. protected $watch_owners = false;
  53. /**
  54. * Constructor.
  55. *
  56. * @param array $data {
  57. * Optional. Data for populating the Message object.
  58. *
  59. * @type int|string $req_id
  60. * Client-defined request id, echoed in the response
  61. * @type string $name
  62. * Name of the semaphore to describe
  63. * @type bool $include_owners
  64. * Response will include owners list if true
  65. * @type bool $include_waiters
  66. * Response will include waiters list if true
  67. * @type bool $watch_data
  68. * Watch for changes in semaphore data
  69. * @type bool $watch_owners
  70. * Watch for changes in semaphore owners (including owners data)
  71. * }
  72. */
  73. public function __construct($data = NULL) {
  74. \GPBMetadata\Protos\YdbCoordination::initOnce();
  75. parent::__construct($data);
  76. }
  77. /**
  78. * Client-defined request id, echoed in the response
  79. *
  80. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  81. * @return int|string
  82. */
  83. public function getReqId()
  84. {
  85. return $this->req_id;
  86. }
  87. /**
  88. * Client-defined request id, echoed in the response
  89. *
  90. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  91. * @param int|string $var
  92. * @return $this
  93. */
  94. public function setReqId($var)
  95. {
  96. GPBUtil::checkUint64($var);
  97. $this->req_id = $var;
  98. return $this;
  99. }
  100. /**
  101. * Name of the semaphore to describe
  102. *
  103. * Generated from protobuf field <code>string name = 2;</code>
  104. * @return string
  105. */
  106. public function getName()
  107. {
  108. return $this->name;
  109. }
  110. /**
  111. * Name of the semaphore to describe
  112. *
  113. * Generated from protobuf field <code>string name = 2;</code>
  114. * @param string $var
  115. * @return $this
  116. */
  117. public function setName($var)
  118. {
  119. GPBUtil::checkString($var, True);
  120. $this->name = $var;
  121. return $this;
  122. }
  123. /**
  124. * Response will include owners list if true
  125. *
  126. * Generated from protobuf field <code>bool include_owners = 3;</code>
  127. * @return bool
  128. */
  129. public function getIncludeOwners()
  130. {
  131. return $this->include_owners;
  132. }
  133. /**
  134. * Response will include owners list if true
  135. *
  136. * Generated from protobuf field <code>bool include_owners = 3;</code>
  137. * @param bool $var
  138. * @return $this
  139. */
  140. public function setIncludeOwners($var)
  141. {
  142. GPBUtil::checkBool($var);
  143. $this->include_owners = $var;
  144. return $this;
  145. }
  146. /**
  147. * Response will include waiters list if true
  148. *
  149. * Generated from protobuf field <code>bool include_waiters = 4;</code>
  150. * @return bool
  151. */
  152. public function getIncludeWaiters()
  153. {
  154. return $this->include_waiters;
  155. }
  156. /**
  157. * Response will include waiters list if true
  158. *
  159. * Generated from protobuf field <code>bool include_waiters = 4;</code>
  160. * @param bool $var
  161. * @return $this
  162. */
  163. public function setIncludeWaiters($var)
  164. {
  165. GPBUtil::checkBool($var);
  166. $this->include_waiters = $var;
  167. return $this;
  168. }
  169. /**
  170. * Watch for changes in semaphore data
  171. *
  172. * Generated from protobuf field <code>bool watch_data = 5;</code>
  173. * @return bool
  174. */
  175. public function getWatchData()
  176. {
  177. return $this->watch_data;
  178. }
  179. /**
  180. * Watch for changes in semaphore data
  181. *
  182. * Generated from protobuf field <code>bool watch_data = 5;</code>
  183. * @param bool $var
  184. * @return $this
  185. */
  186. public function setWatchData($var)
  187. {
  188. GPBUtil::checkBool($var);
  189. $this->watch_data = $var;
  190. return $this;
  191. }
  192. /**
  193. * Watch for changes in semaphore owners (including owners data)
  194. *
  195. * Generated from protobuf field <code>bool watch_owners = 6;</code>
  196. * @return bool
  197. */
  198. public function getWatchOwners()
  199. {
  200. return $this->watch_owners;
  201. }
  202. /**
  203. * Watch for changes in semaphore owners (including owners data)
  204. *
  205. * Generated from protobuf field <code>bool watch_owners = 6;</code>
  206. * @param bool $var
  207. * @return $this
  208. */
  209. public function setWatchOwners($var)
  210. {
  211. GPBUtil::checkBool($var);
  212. $this->watch_owners = $var;
  213. return $this;
  214. }
  215. }
  216. // Adding a class alias for backwards compatibility with the previous class name.
  217. class_alias(DescribeSemaphore::class, \Ydb\Coordination\SessionRequest_DescribeSemaphore::class);