backend_pb2.pyi 3.8 KB

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