UpdateSemaphore.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 change semaphore data
  11. *
  12. * Generated from protobuf message <code>Ydb.Coordination.SessionRequest.UpdateSemaphore</code>
  13. */
  14. class UpdateSemaphore extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Client-defined request id, echoed in the response
  18. *
  19. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  20. */
  21. protected $req_id = 0;
  22. /**
  23. * Name of the semaphore to update
  24. *
  25. * Generated from protobuf field <code>string name = 2;</code>
  26. */
  27. protected $name = '';
  28. /**
  29. * User-defined data that is attached to the semaphore
  30. *
  31. * Generated from protobuf field <code>bytes data = 3;</code>
  32. */
  33. protected $data = '';
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type int|string $req_id
  41. * Client-defined request id, echoed in the response
  42. * @type string $name
  43. * Name of the semaphore to update
  44. * @type string $data
  45. * User-defined data that is attached to the semaphore
  46. * }
  47. */
  48. public function __construct($data = NULL) {
  49. \GPBMetadata\Protos\YdbCoordination::initOnce();
  50. parent::__construct($data);
  51. }
  52. /**
  53. * Client-defined request id, echoed in the response
  54. *
  55. * Generated from protobuf field <code>uint64 req_id = 1;</code>
  56. * @return int|string
  57. */
  58. public function getReqId()
  59. {
  60. return $this->req_id;
  61. }
  62. /**
  63. * Client-defined request id, echoed in the response
  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. * Name of the semaphore to update
  77. *
  78. * Generated from protobuf field <code>string name = 2;</code>
  79. * @return string
  80. */
  81. public function getName()
  82. {
  83. return $this->name;
  84. }
  85. /**
  86. * Name of the semaphore to update
  87. *
  88. * Generated from protobuf field <code>string name = 2;</code>
  89. * @param string $var
  90. * @return $this
  91. */
  92. public function setName($var)
  93. {
  94. GPBUtil::checkString($var, True);
  95. $this->name = $var;
  96. return $this;
  97. }
  98. /**
  99. * User-defined data that is attached to the semaphore
  100. *
  101. * Generated from protobuf field <code>bytes data = 3;</code>
  102. * @return string
  103. */
  104. public function getData()
  105. {
  106. return $this->data;
  107. }
  108. /**
  109. * User-defined data that is attached to the semaphore
  110. *
  111. * Generated from protobuf field <code>bytes data = 3;</code>
  112. * @param string $var
  113. * @return $this
  114. */
  115. public function setData($var)
  116. {
  117. GPBUtil::checkString($var, False);
  118. $this->data = $var;
  119. return $this;
  120. }
  121. }
  122. // Adding a class alias for backwards compatibility with the previous class name.
  123. class_alias(UpdateSemaphore::class, \Ydb\Coordination\SessionRequest_UpdateSemaphore::class);