Ydb.RateLimiter.AcquireResourceRequest
*/
class AcquireResourceRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
*/
protected $operation_params = null;
/**
* Path of a coordination node.
*
* Generated from protobuf field string coordination_node_path = 2;
*/
protected $coordination_node_path = '';
/**
* Path of resource inside a coordination node.
*
* Generated from protobuf field string resource_path = 3;
*/
protected $resource_path = '';
protected $units;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Ydb\Operations\OperationParams $operation_params
* @type string $coordination_node_path
* Path of a coordination node.
* @type string $resource_path
* Path of resource inside a coordination node.
* @type int|string $required
* Request resource's units for usage.
* @type int|string $used
* Actually used resource's units by client.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbRateLimiter::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
* @return \Ydb\Operations\OperationParams|null
*/
public function getOperationParams()
{
return $this->operation_params;
}
public function hasOperationParams()
{
return isset($this->operation_params);
}
public function clearOperationParams()
{
unset($this->operation_params);
}
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
* @param \Ydb\Operations\OperationParams $var
* @return $this
*/
public function setOperationParams($var)
{
GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
$this->operation_params = $var;
return $this;
}
/**
* Path of a coordination node.
*
* Generated from protobuf field string coordination_node_path = 2;
* @return string
*/
public function getCoordinationNodePath()
{
return $this->coordination_node_path;
}
/**
* Path of a coordination node.
*
* Generated from protobuf field string coordination_node_path = 2;
* @param string $var
* @return $this
*/
public function setCoordinationNodePath($var)
{
GPBUtil::checkString($var, True);
$this->coordination_node_path = $var;
return $this;
}
/**
* Path of resource inside a coordination node.
*
* Generated from protobuf field string resource_path = 3;
* @return string
*/
public function getResourcePath()
{
return $this->resource_path;
}
/**
* Path of resource inside a coordination node.
*
* Generated from protobuf field string resource_path = 3;
* @param string $var
* @return $this
*/
public function setResourcePath($var)
{
GPBUtil::checkString($var, True);
$this->resource_path = $var;
return $this;
}
/**
* Request resource's units for usage.
*
* Generated from protobuf field uint64 required = 4;
* @return int|string
*/
public function getRequired()
{
return $this->readOneof(4);
}
public function hasRequired()
{
return $this->hasOneof(4);
}
/**
* Request resource's units for usage.
*
* Generated from protobuf field uint64 required = 4;
* @param int|string $var
* @return $this
*/
public function setRequired($var)
{
GPBUtil::checkUint64($var);
$this->writeOneof(4, $var);
return $this;
}
/**
* Actually used resource's units by client.
*
* Generated from protobuf field uint64 used = 5;
* @return int|string
*/
public function getUsed()
{
return $this->readOneof(5);
}
public function hasUsed()
{
return $this->hasOneof(5);
}
/**
* Actually used resource's units by client.
*
* Generated from protobuf field uint64 used = 5;
* @param int|string $var
* @return $this
*/
public function setUsed($var)
{
GPBUtil::checkUint64($var);
$this->writeOneof(5, $var);
return $this;
}
/**
* @return string
*/
public function getUnits()
{
return $this->whichOneof("units");
}
}