| 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 |
|
| 15 |
from typing import ClassVar as _ClassVar |
| 16 |
from typing import Iterable as _Iterable |
| 17 |
from typing import Mapping as _Mapping |
| 18 |
from typing import Optional as _Optional |
| 19 |
from typing import Union as _Union |
| 20 |
|
| 21 |
from google.protobuf import descriptor as _descriptor |
| 22 |
from google.protobuf import message as _message |
| 23 |
from google.protobuf.internal import containers as _containers |
| 24 |
|
| 25 |
DESCRIPTOR: _descriptor.FileDescriptor |
| 26 |
|
| 27 |
class Quota(_message.Message): |
| 28 |
__slots__ = ("limits", "metric_rules") |
| 29 |
LIMITS_FIELD_NUMBER: _ClassVar[int] |
| 30 |
METRIC_RULES_FIELD_NUMBER: _ClassVar[int] |
| 31 |
limits: _containers.RepeatedCompositeFieldContainer[QuotaLimit] |
| 32 |
metric_rules: _containers.RepeatedCompositeFieldContainer[MetricRule] |
| 33 |
def __init__( |
| 34 |
self, |
| 35 |
limits: _Optional[_Iterable[_Union[QuotaLimit, _Mapping]]] = ..., |
| 36 |
metric_rules: _Optional[_Iterable[_Union[MetricRule, _Mapping]]] = ..., |
| 37 |
) -> None: ... |
| 38 |
|
| 39 |
class MetricRule(_message.Message): |
| 40 |
__slots__ = ("selector", "metric_costs") |
| 41 |
class MetricCostsEntry(_message.Message): |
| 42 |
__slots__ = ("key", "value") |
| 43 |
KEY_FIELD_NUMBER: _ClassVar[int] |
| 44 |
VALUE_FIELD_NUMBER: _ClassVar[int] |
| 45 |
key: str |
| 46 |
value: int |
| 47 |
def __init__( |
| 48 |
self, key: _Optional[str] = ..., value: _Optional[int] = ... |
| 49 |
) -> None: ... |
| 50 |
|
| 51 |
SELECTOR_FIELD_NUMBER: _ClassVar[int] |
| 52 |
METRIC_COSTS_FIELD_NUMBER: _ClassVar[int] |
| 53 |
selector: str |
| 54 |
metric_costs: _containers.ScalarMap[str, int] |
| 55 |
def __init__( |
| 56 |
self, |
| 57 |
selector: _Optional[str] = ..., |
| 58 |
metric_costs: _Optional[_Mapping[str, int]] = ..., |
| 59 |
) -> None: ... |
| 60 |
|
| 61 |
class QuotaLimit(_message.Message): |
| 62 |
__slots__ = ( |
| 63 |
"name", |
| 64 |
"description", |
| 65 |
"default_limit", |
| 66 |
"max_limit", |
| 67 |
"free_tier", |
| 68 |
"duration", |
| 69 |
"metric", |
| 70 |
"unit", |
| 71 |
"values", |
| 72 |
"display_name", |
| 73 |
) |
| 74 |
class ValuesEntry(_message.Message): |
| 75 |
__slots__ = ("key", "value") |
| 76 |
KEY_FIELD_NUMBER: _ClassVar[int] |
| 77 |
VALUE_FIELD_NUMBER: _ClassVar[int] |
| 78 |
key: str |
| 79 |
value: int |
| 80 |
def __init__( |
| 81 |
self, key: _Optional[str] = ..., value: _Optional[int] = ... |
| 82 |
) -> None: ... |
| 83 |
|
| 84 |
NAME_FIELD_NUMBER: _ClassVar[int] |
| 85 |
DESCRIPTION_FIELD_NUMBER: _ClassVar[int] |
| 86 |
DEFAULT_LIMIT_FIELD_NUMBER: _ClassVar[int] |
| 87 |
MAX_LIMIT_FIELD_NUMBER: _ClassVar[int] |
| 88 |
FREE_TIER_FIELD_NUMBER: _ClassVar[int] |
| 89 |
DURATION_FIELD_NUMBER: _ClassVar[int] |
| 90 |
METRIC_FIELD_NUMBER: _ClassVar[int] |
| 91 |
UNIT_FIELD_NUMBER: _ClassVar[int] |
| 92 |
VALUES_FIELD_NUMBER: _ClassVar[int] |
| 93 |
DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int] |
| 94 |
name: str |
| 95 |
description: str |
| 96 |
default_limit: int |
| 97 |
max_limit: int |
| 98 |
free_tier: int |
| 99 |
duration: str |
| 100 |
metric: str |
| 101 |
unit: str |
| 102 |
values: _containers.ScalarMap[str, int] |
| 103 |
display_name: str |
| 104 |
def __init__( |
| 105 |
self, |
| 106 |
name: _Optional[str] = ..., |
| 107 |
description: _Optional[str] = ..., |
| 108 |
default_limit: _Optional[int] = ..., |
| 109 |
max_limit: _Optional[int] = ..., |
| 110 |
free_tier: _Optional[int] = ..., |
| 111 |
duration: _Optional[str] = ..., |
| 112 |
metric: _Optional[str] = ..., |
| 113 |
unit: _Optional[str] = ..., |
| 114 |
values: _Optional[_Mapping[str, int]] = ..., |
| 115 |
display_name: _Optional[str] = ..., |
| 116 |
) -> None: ... |