DescribeSemaphoreResult.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_coordination.proto
  4. namespace Ydb\Coordination\SessionResponse;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. **
  10. * The result of the describe operation
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionResponse.DescribeSemaphoreResult</code>
  13. */
  14. class DescribeSemaphoreResult extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  18. */
  19. protected $req_id = 0;
  20. /**
  21. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 2;</code>
  22. */
  23. protected $status = 0;
  24. /**
  25. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 3;</code>
  26. */
  27. private $issues;
  28. /**
  29. * Generated from protobuf field <code>.Ydb.Coordination.SemaphoreDescription semaphore_description = 4;</code>
  30. */
  31. protected $semaphore_description = null;
  32. /**
  33. * True if a watch has been added for the semaphore
  34. *
  35. * Generated from protobuf field <code>bool watch_added = 5;</code>
  36. */
  37. protected $watch_added = false;
  38. /**
  39. * Constructor.
  40. *
  41. * @param array $data {
  42. * Optional. Data for populating the Message object.
  43. *
  44. * @type int|string $req_id
  45. * @type int $status
  46. * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues
  47. * @type \Ydb\Coordination\SemaphoreDescription $semaphore_description
  48. * @type bool $watch_added
  49. * True if a watch has been added for the semaphore
  50. * }
  51. */
  52. public function __construct($data = NULL) {
  53. \GPBMetadata\Protos\YdbCoordination::initOnce();
  54. parent::__construct($data);
  55. }
  56. /**
  57. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  58. * @return int|string
  59. */
  60. public function getReqId()
  61. {
  62. return $this->req_id;
  63. }
  64. /**
  65. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  66. * @param int|string $var
  67. * @return $this
  68. */
  69. public function setReqId($var)
  70. {
  71. GPBUtil::checkUint64($var);
  72. $this->req_id = $var;
  73. return $this;
  74. }
  75. /**
  76. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 2;</code>
  77. * @return int
  78. */
  79. public function getStatus()
  80. {
  81. return $this->status;
  82. }
  83. /**
  84. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 2;</code>
  85. * @param int $var
  86. * @return $this
  87. */
  88. public function setStatus($var)
  89. {
  90. GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class);
  91. $this->status = $var;
  92. return $this;
  93. }
  94. /**
  95. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 3;</code>
  96. * @return \Google\Protobuf\Internal\RepeatedField
  97. */
  98. public function getIssues()
  99. {
  100. return $this->issues;
  101. }
  102. /**
  103. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 3;</code>
  104. * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var
  105. * @return $this
  106. */
  107. public function setIssues($var)
  108. {
  109. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class);
  110. $this->issues = $arr;
  111. return $this;
  112. }
  113. /**
  114. * Generated from protobuf field <code>.Ydb.Coordination.SemaphoreDescription semaphore_description = 4;</code>
  115. * @return \Ydb\Coordination\SemaphoreDescription|null
  116. */
  117. public function getSemaphoreDescription()
  118. {
  119. return $this->semaphore_description;
  120. }
  121. public function hasSemaphoreDescription()
  122. {
  123. return isset($this->semaphore_description);
  124. }
  125. public function clearSemaphoreDescription()
  126. {
  127. unset($this->semaphore_description);
  128. }
  129. /**
  130. * Generated from protobuf field <code>.Ydb.Coordination.SemaphoreDescription semaphore_description = 4;</code>
  131. * @param \Ydb\Coordination\SemaphoreDescription $var
  132. * @return $this
  133. */
  134. public function setSemaphoreDescription($var)
  135. {
  136. GPBUtil::checkMessage($var, \Ydb\Coordination\SemaphoreDescription::class);
  137. $this->semaphore_description = $var;
  138. return $this;
  139. }
  140. /**
  141. * True if a watch has been added for the semaphore
  142. *
  143. * Generated from protobuf field <code>bool watch_added = 5;</code>
  144. * @return bool
  145. */
  146. public function getWatchAdded()
  147. {
  148. return $this->watch_added;
  149. }
  150. /**
  151. * True if a watch has been added for the semaphore
  152. *
  153. * Generated from protobuf field <code>bool watch_added = 5;</code>
  154. * @param bool $var
  155. * @return $this
  156. */
  157. public function setWatchAdded($var)
  158. {
  159. GPBUtil::checkBool($var);
  160. $this->watch_added = $var;
  161. return $this;
  162. }
  163. }
  164. // Adding a class alias for backwards compatibility with the previous class name.
  165. class_alias(DescribeSemaphoreResult::class, \Ydb\Coordination\SessionResponse_DescribeSemaphoreResult::class);