Ydb.RateLimiter.Resource */ class Resource extends \Google\Protobuf\Internal\Message { /** * Resource path. Elements are separated by slash. * The first symbol is not slash. * The first element is root resource name. * Resource path is the path of resource inside coordination node. * * Generated from protobuf field string resource_path = 1; */ protected $resource_path = ''; protected $type; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $resource_path * Resource path. Elements are separated by slash. * The first symbol is not slash. * The first element is root resource name. * Resource path is the path of resource inside coordination node. * @type \Ydb\RateLimiter\HierarchicalDrrSettings $hierarchical_drr * Settings for Hierarchical DRR algorithm. * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbRateLimiter::initOnce(); parent::__construct($data); } /** * Resource path. Elements are separated by slash. * The first symbol is not slash. * The first element is root resource name. * Resource path is the path of resource inside coordination node. * * Generated from protobuf field string resource_path = 1; * @return string */ public function getResourcePath() { return $this->resource_path; } /** * Resource path. Elements are separated by slash. * The first symbol is not slash. * The first element is root resource name. * Resource path is the path of resource inside coordination node. * * Generated from protobuf field string resource_path = 1; * @param string $var * @return $this */ public function setResourcePath($var) { GPBUtil::checkString($var, True); $this->resource_path = $var; return $this; } /** * Settings for Hierarchical DRR algorithm. * * Generated from protobuf field .Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2; * @return \Ydb\RateLimiter\HierarchicalDrrSettings|null */ public function getHierarchicalDrr() { return $this->readOneof(2); } public function hasHierarchicalDrr() { return $this->hasOneof(2); } /** * Settings for Hierarchical DRR algorithm. * * Generated from protobuf field .Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2; * @param \Ydb\RateLimiter\HierarchicalDrrSettings $var * @return $this */ public function setHierarchicalDrr($var) { GPBUtil::checkMessage($var, \Ydb\RateLimiter\HierarchicalDrrSettings::class); $this->writeOneof(2, $var); return $this; } /** * @return string */ public function getType() { return $this->whichOneof("type"); } }