Ydb.Coordination.SessionRequest.AcquireSemaphore */ class AcquireSemaphore 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 acquire * * Generated from protobuf field string name = 2; */ protected $name = ''; /** * Timeout in milliseconds after which operation will fail * if it's still waiting in the waiters queue * * Generated from protobuf field uint64 timeout_millis = 3; */ protected $timeout_millis = 0; /** * Number of tokens to acquire on the semaphore * * Generated from protobuf field uint64 count = 4; */ protected $count = 0; /** * User-defined binary data that may be attached to the operation * * Generated from protobuf field bytes data = 5; */ protected $data = ''; /** * Ephemeral semaphores are created with the first acquire operation * and automatically deleted with the last release operation * * Generated from protobuf field bool ephemeral = 6; */ protected $ephemeral = false; /** * 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 acquire * @type int|string $timeout_millis * Timeout in milliseconds after which operation will fail * if it's still waiting in the waiters queue * @type int|string $count * Number of tokens to acquire on the semaphore * @type string $data * User-defined binary data that may be attached to the operation * @type bool $ephemeral * Ephemeral semaphores are created with the first acquire operation * and automatically deleted with the last release operation * } */ 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 acquire * * Generated from protobuf field string name = 2; * @return string */ public function getName() { return $this->name; } /** * Name of the semaphore to acquire * * 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; } /** * Timeout in milliseconds after which operation will fail * if it's still waiting in the waiters queue * * Generated from protobuf field uint64 timeout_millis = 3; * @return int|string */ public function getTimeoutMillis() { return $this->timeout_millis; } /** * Timeout in milliseconds after which operation will fail * if it's still waiting in the waiters queue * * Generated from protobuf field uint64 timeout_millis = 3; * @param int|string $var * @return $this */ public function setTimeoutMillis($var) { GPBUtil::checkUint64($var); $this->timeout_millis = $var; return $this; } /** * Number of tokens to acquire on the semaphore * * Generated from protobuf field uint64 count = 4; * @return int|string */ public function getCount() { return $this->count; } /** * Number of tokens to acquire on the semaphore * * Generated from protobuf field uint64 count = 4; * @param int|string $var * @return $this */ public function setCount($var) { GPBUtil::checkUint64($var); $this->count = $var; return $this; } /** * User-defined binary data that may be attached to the operation * * Generated from protobuf field bytes data = 5; * @return string */ public function getData() { return $this->data; } /** * User-defined binary data that may be attached to the operation * * Generated from protobuf field bytes data = 5; * @param string $var * @return $this */ public function setData($var) { GPBUtil::checkString($var, False); $this->data = $var; return $this; } /** * Ephemeral semaphores are created with the first acquire operation * and automatically deleted with the last release operation * * Generated from protobuf field bool ephemeral = 6; * @return bool */ public function getEphemeral() { return $this->ephemeral; } /** * Ephemeral semaphores are created with the first acquire operation * and automatically deleted with the last release operation * * Generated from protobuf field bool ephemeral = 6; * @param bool $var * @return $this */ public function setEphemeral($var) { GPBUtil::checkBool($var); $this->ephemeral = $var; return $this; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(AcquireSemaphore::class, \Ydb\Coordination\SessionRequest_AcquireSemaphore::class);