123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_rate_limiter.proto
- namespace Ydb\RateLimiter;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Rate limiter resource description.
- *
- * Generated from protobuf message <code>Ydb.RateLimiter.Resource</code>
- */
- 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 <code>string resource_path = 1;</code>
- */
- 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 <code>string resource_path = 1;</code>
- * @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 <code>string resource_path = 1;</code>
- * @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 <code>.Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2;</code>
- * @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 <code>.Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2;</code>
- * @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");
- }
- }
|