quota_pb2.pyi 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Copyright 2025 Google LLC
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. from typing import ClassVar as _ClassVar
  15. from typing import Iterable as _Iterable
  16. from typing import Mapping as _Mapping
  17. from typing import Optional as _Optional
  18. from typing import Union as _Union
  19. from google.protobuf import descriptor as _descriptor
  20. from google.protobuf import message as _message
  21. from google.protobuf.internal import containers as _containers
  22. DESCRIPTOR: _descriptor.FileDescriptor
  23. class Quota(_message.Message):
  24. __slots__ = ("limits", "metric_rules")
  25. LIMITS_FIELD_NUMBER: _ClassVar[int]
  26. METRIC_RULES_FIELD_NUMBER: _ClassVar[int]
  27. limits: _containers.RepeatedCompositeFieldContainer[QuotaLimit]
  28. metric_rules: _containers.RepeatedCompositeFieldContainer[MetricRule]
  29. def __init__(
  30. self,
  31. limits: _Optional[_Iterable[_Union[QuotaLimit, _Mapping]]] = ...,
  32. metric_rules: _Optional[_Iterable[_Union[MetricRule, _Mapping]]] = ...,
  33. ) -> None: ...
  34. class MetricRule(_message.Message):
  35. __slots__ = ("selector", "metric_costs")
  36. class MetricCostsEntry(_message.Message):
  37. __slots__ = ("key", "value")
  38. KEY_FIELD_NUMBER: _ClassVar[int]
  39. VALUE_FIELD_NUMBER: _ClassVar[int]
  40. key: str
  41. value: int
  42. def __init__(
  43. self, key: _Optional[str] = ..., value: _Optional[int] = ...
  44. ) -> None: ...
  45. SELECTOR_FIELD_NUMBER: _ClassVar[int]
  46. METRIC_COSTS_FIELD_NUMBER: _ClassVar[int]
  47. selector: str
  48. metric_costs: _containers.ScalarMap[str, int]
  49. def __init__(
  50. self,
  51. selector: _Optional[str] = ...,
  52. metric_costs: _Optional[_Mapping[str, int]] = ...,
  53. ) -> None: ...
  54. class QuotaLimit(_message.Message):
  55. __slots__ = (
  56. "name",
  57. "description",
  58. "default_limit",
  59. "max_limit",
  60. "free_tier",
  61. "duration",
  62. "metric",
  63. "unit",
  64. "values",
  65. "display_name",
  66. )
  67. class ValuesEntry(_message.Message):
  68. __slots__ = ("key", "value")
  69. KEY_FIELD_NUMBER: _ClassVar[int]
  70. VALUE_FIELD_NUMBER: _ClassVar[int]
  71. key: str
  72. value: int
  73. def __init__(
  74. self, key: _Optional[str] = ..., value: _Optional[int] = ...
  75. ) -> None: ...
  76. NAME_FIELD_NUMBER: _ClassVar[int]
  77. DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
  78. DEFAULT_LIMIT_FIELD_NUMBER: _ClassVar[int]
  79. MAX_LIMIT_FIELD_NUMBER: _ClassVar[int]
  80. FREE_TIER_FIELD_NUMBER: _ClassVar[int]
  81. DURATION_FIELD_NUMBER: _ClassVar[int]
  82. METRIC_FIELD_NUMBER: _ClassVar[int]
  83. UNIT_FIELD_NUMBER: _ClassVar[int]
  84. VALUES_FIELD_NUMBER: _ClassVar[int]
  85. DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]
  86. name: str
  87. description: str
  88. default_limit: int
  89. max_limit: int
  90. free_tier: int
  91. duration: str
  92. metric: str
  93. unit: str
  94. values: _containers.ScalarMap[str, int]
  95. display_name: str
  96. def __init__(
  97. self,
  98. name: _Optional[str] = ...,
  99. description: _Optional[str] = ...,
  100. default_limit: _Optional[int] = ...,
  101. max_limit: _Optional[int] = ...,
  102. free_tier: _Optional[int] = ...,
  103. duration: _Optional[str] = ...,
  104. metric: _Optional[str] = ...,
  105. unit: _Optional[str] = ...,
  106. values: _Optional[_Mapping[str, int]] = ...,
  107. display_name: _Optional[str] = ...,
  108. ) -> None: ...