Ydb.Coordination.SessionRequest.CreateSemaphore */ class CreateSemaphore extends \Google\Protobuf\Internal\Message { /** * Client-defined request id, echoed in the response * * Generated from protobuf field uint64 req_id = 1; */ protected $req_id = 0; /** * Name of the semaphore to create * * Generated from protobuf field string name = 2; */ protected $name = ''; /** * Number of tokens that may be acquired by sessions * * Generated from protobuf field uint64 limit = 3; */ protected $limit = 0; /** * User-defined data that is attached to the semaphore * * Generated from protobuf field bytes data = 4; */ protected $data = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int|string $req_id * Client-defined request id, echoed in the response * @type string $name * Name of the semaphore to create * @type int|string $limit * Number of tokens that may be acquired by sessions * @type string $data * User-defined data that is attached to the semaphore * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbCoordination::initOnce(); parent::__construct($data); } /** * Client-defined request id, echoed in the response * * Generated from protobuf field uint64 req_id = 1; * @return int|string */ public function getReqId() { return $this->req_id; } /** * Client-defined request id, echoed in the response * * Generated from protobuf field uint64 req_id = 1; * @param int|string $var * @return $this */ public function setReqId($var) { GPBUtil::checkUint64($var); $this->req_id = $var; return $this; } /** * Name of the semaphore to create * * Generated from protobuf field string name = 2; * @return string */ public function getName() { return $this->name; } /** * Name of the semaphore to create * * Generated from protobuf field string name = 2; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } /** * Number of tokens that may be acquired by sessions * * Generated from protobuf field uint64 limit = 3; * @return int|string */ public function getLimit() { return $this->limit; } /** * Number of tokens that may be acquired by sessions * * Generated from protobuf field uint64 limit = 3; * @param int|string $var * @return $this */ public function setLimit($var) { GPBUtil::checkUint64($var); $this->limit = $var; return $this; } /** * User-defined data that is attached to the semaphore * * Generated from protobuf field bytes data = 4; * @return string */ public function getData() { return $this->data; } /** * User-defined data that is attached to the semaphore * * Generated from protobuf field bytes data = 4; * @param string $var * @return $this */ public function setData($var) { GPBUtil::checkString($var, False); $this->data = $var; return $this; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(CreateSemaphore::class, \Ydb\Coordination\SessionRequest_CreateSemaphore::class);