Resource.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_rate_limiter.proto
  4. namespace Ydb\RateLimiter;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Rate limiter resource description.
  10. *
  11. * Generated from protobuf message <code>Ydb.RateLimiter.Resource</code>
  12. */
  13. class Resource extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Resource path. Elements are separated by slash.
  17. * The first symbol is not slash.
  18. * The first element is root resource name.
  19. * Resource path is the path of resource inside coordination node.
  20. *
  21. * Generated from protobuf field <code>string resource_path = 1;</code>
  22. */
  23. protected $resource_path = '';
  24. protected $type;
  25. /**
  26. * Constructor.
  27. *
  28. * @param array $data {
  29. * Optional. Data for populating the Message object.
  30. *
  31. * @type string $resource_path
  32. * Resource path. Elements are separated by slash.
  33. * The first symbol is not slash.
  34. * The first element is root resource name.
  35. * Resource path is the path of resource inside coordination node.
  36. * @type \Ydb\RateLimiter\HierarchicalDrrSettings $hierarchical_drr
  37. * Settings for Hierarchical DRR algorithm.
  38. * }
  39. */
  40. public function __construct($data = NULL) {
  41. \GPBMetadata\Protos\YdbRateLimiter::initOnce();
  42. parent::__construct($data);
  43. }
  44. /**
  45. * Resource path. Elements are separated by slash.
  46. * The first symbol is not slash.
  47. * The first element is root resource name.
  48. * Resource path is the path of resource inside coordination node.
  49. *
  50. * Generated from protobuf field <code>string resource_path = 1;</code>
  51. * @return string
  52. */
  53. public function getResourcePath()
  54. {
  55. return $this->resource_path;
  56. }
  57. /**
  58. * Resource path. Elements are separated by slash.
  59. * The first symbol is not slash.
  60. * The first element is root resource name.
  61. * Resource path is the path of resource inside coordination node.
  62. *
  63. * Generated from protobuf field <code>string resource_path = 1;</code>
  64. * @param string $var
  65. * @return $this
  66. */
  67. public function setResourcePath($var)
  68. {
  69. GPBUtil::checkString($var, True);
  70. $this->resource_path = $var;
  71. return $this;
  72. }
  73. /**
  74. * Settings for Hierarchical DRR algorithm.
  75. *
  76. * Generated from protobuf field <code>.Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2;</code>
  77. * @return \Ydb\RateLimiter\HierarchicalDrrSettings|null
  78. */
  79. public function getHierarchicalDrr()
  80. {
  81. return $this->readOneof(2);
  82. }
  83. public function hasHierarchicalDrr()
  84. {
  85. return $this->hasOneof(2);
  86. }
  87. /**
  88. * Settings for Hierarchical DRR algorithm.
  89. *
  90. * Generated from protobuf field <code>.Ydb.RateLimiter.HierarchicalDrrSettings hierarchical_drr = 2;</code>
  91. * @param \Ydb\RateLimiter\HierarchicalDrrSettings $var
  92. * @return $this
  93. */
  94. public function setHierarchicalDrr($var)
  95. {
  96. GPBUtil::checkMessage($var, \Ydb\RateLimiter\HierarchicalDrrSettings::class);
  97. $this->writeOneof(2, $var);
  98. return $this;
  99. }
  100. /**
  101. * @return string
  102. */
  103. public function getType()
  104. {
  105. return $this->whichOneof("type");
  106. }
  107. }