LeakyBucket.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_cms.proto
  4. namespace Ydb\Cms\SchemaOperationQuotas;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * A single quota based on leaky bucket
  10. *
  11. * Generated from protobuf message <code>Ydb.Cms.SchemaOperationQuotas.LeakyBucket</code>
  12. */
  13. class LeakyBucket extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Bucket size, e.g. <1000> per day
  17. *
  18. * Generated from protobuf field <code>double bucket_size = 1;</code>
  19. */
  20. protected $bucket_size = 0.0;
  21. /**
  22. * Bucket duration in seconds, e.g. 1000 per <day>
  23. *
  24. * Generated from protobuf field <code>uint64 bucket_seconds = 2;</code>
  25. */
  26. protected $bucket_seconds = 0;
  27. /**
  28. * Constructor.
  29. *
  30. * @param array $data {
  31. * Optional. Data for populating the Message object.
  32. *
  33. * @type float $bucket_size
  34. * Bucket size, e.g. <1000> per day
  35. * @type int|string $bucket_seconds
  36. * Bucket duration in seconds, e.g. 1000 per <day>
  37. * }
  38. */
  39. public function __construct($data = NULL) {
  40. \GPBMetadata\Protos\YdbCms::initOnce();
  41. parent::__construct($data);
  42. }
  43. /**
  44. * Bucket size, e.g. <1000> per day
  45. *
  46. * Generated from protobuf field <code>double bucket_size = 1;</code>
  47. * @return float
  48. */
  49. public function getBucketSize()
  50. {
  51. return $this->bucket_size;
  52. }
  53. /**
  54. * Bucket size, e.g. <1000> per day
  55. *
  56. * Generated from protobuf field <code>double bucket_size = 1;</code>
  57. * @param float $var
  58. * @return $this
  59. */
  60. public function setBucketSize($var)
  61. {
  62. GPBUtil::checkDouble($var);
  63. $this->bucket_size = $var;
  64. return $this;
  65. }
  66. /**
  67. * Bucket duration in seconds, e.g. 1000 per <day>
  68. *
  69. * Generated from protobuf field <code>uint64 bucket_seconds = 2;</code>
  70. * @return int|string
  71. */
  72. public function getBucketSeconds()
  73. {
  74. return $this->bucket_seconds;
  75. }
  76. /**
  77. * Bucket duration in seconds, e.g. 1000 per <day>
  78. *
  79. * Generated from protobuf field <code>uint64 bucket_seconds = 2;</code>
  80. * @param int|string $var
  81. * @return $this
  82. */
  83. public function setBucketSeconds($var)
  84. {
  85. GPBUtil::checkUint64($var);
  86. $this->bucket_seconds = $var;
  87. return $this;
  88. }
  89. }
  90. // Adding a class alias for backwards compatibility with the previous class name.
  91. class_alias(LeakyBucket::class, \Ydb\Cms\SchemaOperationQuotas_LeakyBucket::class);