| 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 |
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper |
| 25 |
|
| 26 |
DESCRIPTOR: _descriptor.FileDescriptor |
| 27 |
|
| 28 |
class Backend(_message.Message): |
| 29 |
__slots__ = ("rules",) |
| 30 |
RULES_FIELD_NUMBER: _ClassVar[int] |
| 31 |
rules: _containers.RepeatedCompositeFieldContainer[BackendRule] |
| 32 |
def __init__( |
| 33 |
self, rules: _Optional[_Iterable[_Union[BackendRule, _Mapping]]] = ... |
| 34 |
) -> None: ... |
| 35 |
|
| 36 |
class BackendRule(_message.Message): |
| 37 |
__slots__ = ( |
| 38 |
"selector", |
| 39 |
"address", |
| 40 |
"deadline", |
| 41 |
"min_deadline", |
| 42 |
"operation_deadline", |
| 43 |
"path_translation", |
| 44 |
"jwt_audience", |
| 45 |
"disable_auth", |
| 46 |
"protocol", |
| 47 |
"overrides_by_request_protocol", |
| 48 |
"load_balancing_policy", |
| 49 |
) |
| 50 |
class PathTranslation(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): |
| 51 |
__slots__ = () |
| 52 |
PATH_TRANSLATION_UNSPECIFIED: _ClassVar[BackendRule.PathTranslation] |
| 53 |
CONSTANT_ADDRESS: _ClassVar[BackendRule.PathTranslation] |
| 54 |
APPEND_PATH_TO_ADDRESS: _ClassVar[BackendRule.PathTranslation] |
| 55 |
|
| 56 |
PATH_TRANSLATION_UNSPECIFIED: BackendRule.PathTranslation |
| 57 |
CONSTANT_ADDRESS: BackendRule.PathTranslation |
| 58 |
APPEND_PATH_TO_ADDRESS: BackendRule.PathTranslation |
| 59 |
class OverridesByRequestProtocolEntry(_message.Message): |
| 60 |
__slots__ = ("key", "value") |
| 61 |
KEY_FIELD_NUMBER: _ClassVar[int] |
| 62 |
VALUE_FIELD_NUMBER: _ClassVar[int] |
| 63 |
key: str |
| 64 |
value: BackendRule |
| 65 |
def __init__( |
| 66 |
self, |
| 67 |
key: _Optional[str] = ..., |
| 68 |
value: _Optional[_Union[BackendRule, _Mapping]] = ..., |
| 69 |
) -> None: ... |
| 70 |
|
| 71 |
SELECTOR_FIELD_NUMBER: _ClassVar[int] |
| 72 |
ADDRESS_FIELD_NUMBER: _ClassVar[int] |
| 73 |
DEADLINE_FIELD_NUMBER: _ClassVar[int] |
| 74 |
MIN_DEADLINE_FIELD_NUMBER: _ClassVar[int] |
| 75 |
OPERATION_DEADLINE_FIELD_NUMBER: _ClassVar[int] |
| 76 |
PATH_TRANSLATION_FIELD_NUMBER: _ClassVar[int] |
| 77 |
JWT_AUDIENCE_FIELD_NUMBER: _ClassVar[int] |
| 78 |
DISABLE_AUTH_FIELD_NUMBER: _ClassVar[int] |
| 79 |
PROTOCOL_FIELD_NUMBER: _ClassVar[int] |
| 80 |
OVERRIDES_BY_REQUEST_PROTOCOL_FIELD_NUMBER: _ClassVar[int] |
| 81 |
LOAD_BALANCING_POLICY_FIELD_NUMBER: _ClassVar[int] |
| 82 |
selector: str |
| 83 |
address: str |
| 84 |
deadline: float |
| 85 |
min_deadline: float |
| 86 |
operation_deadline: float |
| 87 |
path_translation: BackendRule.PathTranslation |
| 88 |
jwt_audience: str |
| 89 |
disable_auth: bool |
| 90 |
protocol: str |
| 91 |
overrides_by_request_protocol: _containers.MessageMap[str, BackendRule] |
| 92 |
load_balancing_policy: str |
| 93 |
def __init__( |
| 94 |
self, |
| 95 |
selector: _Optional[str] = ..., |
| 96 |
address: _Optional[str] = ..., |
| 97 |
deadline: _Optional[float] = ..., |
| 98 |
min_deadline: _Optional[float] = ..., |
| 99 |
operation_deadline: _Optional[float] = ..., |
| 100 |
path_translation: _Optional[_Union[BackendRule.PathTranslation, str]] = ..., |
| 101 |
jwt_audience: _Optional[str] = ..., |
| 102 |
disable_auth: bool = ..., |
| 103 |
protocol: _Optional[str] = ..., |
| 104 |
overrides_by_request_protocol: _Optional[_Mapping[str, BackendRule]] = ..., |
| 105 |
load_balancing_policy: _Optional[str] = ..., |
| 106 |
) -> None: ... |