distribution_pb2.pyi 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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 any_pb2 as _any_pb2
  20. from google.protobuf import descriptor as _descriptor
  21. from google.protobuf import message as _message
  22. from google.protobuf import timestamp_pb2 as _timestamp_pb2
  23. from google.protobuf.internal import containers as _containers
  24. DESCRIPTOR: _descriptor.FileDescriptor
  25. class Distribution(_message.Message):
  26. __slots__ = (
  27. "count",
  28. "mean",
  29. "sum_of_squared_deviation",
  30. "range",
  31. "bucket_options",
  32. "bucket_counts",
  33. "exemplars",
  34. )
  35. class Range(_message.Message):
  36. __slots__ = ("min", "max")
  37. MIN_FIELD_NUMBER: _ClassVar[int]
  38. MAX_FIELD_NUMBER: _ClassVar[int]
  39. min: float
  40. max: float
  41. def __init__(
  42. self, min: _Optional[float] = ..., max: _Optional[float] = ...
  43. ) -> None: ...
  44. class BucketOptions(_message.Message):
  45. __slots__ = ("linear_buckets", "exponential_buckets", "explicit_buckets")
  46. class Linear(_message.Message):
  47. __slots__ = ("num_finite_buckets", "width", "offset")
  48. NUM_FINITE_BUCKETS_FIELD_NUMBER: _ClassVar[int]
  49. WIDTH_FIELD_NUMBER: _ClassVar[int]
  50. OFFSET_FIELD_NUMBER: _ClassVar[int]
  51. num_finite_buckets: int
  52. width: float
  53. offset: float
  54. def __init__(
  55. self,
  56. num_finite_buckets: _Optional[int] = ...,
  57. width: _Optional[float] = ...,
  58. offset: _Optional[float] = ...,
  59. ) -> None: ...
  60. class Exponential(_message.Message):
  61. __slots__ = ("num_finite_buckets", "growth_factor", "scale")
  62. NUM_FINITE_BUCKETS_FIELD_NUMBER: _ClassVar[int]
  63. GROWTH_FACTOR_FIELD_NUMBER: _ClassVar[int]
  64. SCALE_FIELD_NUMBER: _ClassVar[int]
  65. num_finite_buckets: int
  66. growth_factor: float
  67. scale: float
  68. def __init__(
  69. self,
  70. num_finite_buckets: _Optional[int] = ...,
  71. growth_factor: _Optional[float] = ...,
  72. scale: _Optional[float] = ...,
  73. ) -> None: ...
  74. class Explicit(_message.Message):
  75. __slots__ = ("bounds",)
  76. BOUNDS_FIELD_NUMBER: _ClassVar[int]
  77. bounds: _containers.RepeatedScalarFieldContainer[float]
  78. def __init__(self, bounds: _Optional[_Iterable[float]] = ...) -> None: ...
  79. LINEAR_BUCKETS_FIELD_NUMBER: _ClassVar[int]
  80. EXPONENTIAL_BUCKETS_FIELD_NUMBER: _ClassVar[int]
  81. EXPLICIT_BUCKETS_FIELD_NUMBER: _ClassVar[int]
  82. linear_buckets: Distribution.BucketOptions.Linear
  83. exponential_buckets: Distribution.BucketOptions.Exponential
  84. explicit_buckets: Distribution.BucketOptions.Explicit
  85. def __init__(
  86. self,
  87. linear_buckets: _Optional[
  88. _Union[Distribution.BucketOptions.Linear, _Mapping]
  89. ] = ...,
  90. exponential_buckets: _Optional[
  91. _Union[Distribution.BucketOptions.Exponential, _Mapping]
  92. ] = ...,
  93. explicit_buckets: _Optional[
  94. _Union[Distribution.BucketOptions.Explicit, _Mapping]
  95. ] = ...,
  96. ) -> None: ...
  97. class Exemplar(_message.Message):
  98. __slots__ = ("value", "timestamp", "attachments")
  99. VALUE_FIELD_NUMBER: _ClassVar[int]
  100. TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
  101. ATTACHMENTS_FIELD_NUMBER: _ClassVar[int]
  102. value: float
  103. timestamp: _timestamp_pb2.Timestamp
  104. attachments: _containers.RepeatedCompositeFieldContainer[_any_pb2.Any]
  105. def __init__(
  106. self,
  107. value: _Optional[float] = ...,
  108. timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
  109. attachments: _Optional[_Iterable[_Union[_any_pb2.Any, _Mapping]]] = ...,
  110. ) -> None: ...
  111. COUNT_FIELD_NUMBER: _ClassVar[int]
  112. MEAN_FIELD_NUMBER: _ClassVar[int]
  113. SUM_OF_SQUARED_DEVIATION_FIELD_NUMBER: _ClassVar[int]
  114. RANGE_FIELD_NUMBER: _ClassVar[int]
  115. BUCKET_OPTIONS_FIELD_NUMBER: _ClassVar[int]
  116. BUCKET_COUNTS_FIELD_NUMBER: _ClassVar[int]
  117. EXEMPLARS_FIELD_NUMBER: _ClassVar[int]
  118. count: int
  119. mean: float
  120. sum_of_squared_deviation: float
  121. range: Distribution.Range
  122. bucket_options: Distribution.BucketOptions
  123. bucket_counts: _containers.RepeatedScalarFieldContainer[int]
  124. exemplars: _containers.RepeatedCompositeFieldContainer[Distribution.Exemplar]
  125. def __init__(
  126. self,
  127. count: _Optional[int] = ...,
  128. mean: _Optional[float] = ...,
  129. sum_of_squared_deviation: _Optional[float] = ...,
  130. range: _Optional[_Union[Distribution.Range, _Mapping]] = ...,
  131. bucket_options: _Optional[_Union[Distribution.BucketOptions, _Mapping]] = ...,
  132. bucket_counts: _Optional[_Iterable[int]] = ...,
  133. exemplars: _Optional[_Iterable[_Union[Distribution.Exemplar, _Mapping]]] = ...,
  134. ) -> None: ...