ReleaseSemaphore.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 release a semaphore
  11. * WARNING: a single session cannot release the same semaphore multiple times
  12. * The release operation will either remove current session from waiters
  13. * queue or release an already owned semaphore.
  14. *
  15. * Generated from protobuf message <code>Ydb.Coordination.SessionRequest.ReleaseSemaphore</code>
  16. */
  17. class ReleaseSemaphore extends \Google\Protobuf\Internal\Message
  18. {
  19. /**
  20. * Client-defined request id, echoed in the response
  21. *
  22. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  23. */
  24. protected $req_id = 0;
  25. /**
  26. * Name of the semaphore to release
  27. *
  28. * Generated from protobuf field <code>string name = 2;</code>
  29. */
  30. protected $name = '';
  31. /**
  32. * Constructor.
  33. *
  34. * @param array $data {
  35. * Optional. Data for populating the Message object.
  36. *
  37. * @type int|string $req_id
  38. * Client-defined request id, echoed in the response
  39. * @type string $name
  40. * Name of the semaphore to release
  41. * }
  42. */
  43. public function __construct($data = NULL) {
  44. \GPBMetadata\Protos\YdbCoordination::initOnce();
  45. parent::__construct($data);
  46. }
  47. /**
  48. * Client-defined request id, echoed in the response
  49. *
  50. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  51. * @return int|string
  52. */
  53. public function getReqId()
  54. {
  55. return $this->req_id;
  56. }
  57. /**
  58. * Client-defined request id, echoed in the response
  59. *
  60. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  61. * @param int|string $var
  62. * @return $this
  63. */
  64. public function setReqId($var)
  65. {
  66. GPBUtil::checkUint64($var);
  67. $this->req_id = $var;
  68. return $this;
  69. }
  70. /**
  71. * Name of the semaphore to release
  72. *
  73. * Generated from protobuf field <code>string name = 2;</code>
  74. * @return string
  75. */
  76. public function getName()
  77. {
  78. return $this->name;
  79. }
  80. /**
  81. * Name of the semaphore to release
  82. *
  83. * Generated from protobuf field <code>string name = 2;</code>
  84. * @param string $var
  85. * @return $this
  86. */
  87. public function setName($var)
  88. {
  89. GPBUtil::checkString($var, True);
  90. $this->name = $var;
  91. return $this;
  92. }
  93. }
  94. // Adding a class alias for backwards compatibility with the previous class name.
  95. class_alias(ReleaseSemaphore::class, \Ydb\Coordination\SessionRequest_ReleaseSemaphore::class);