Debian Codegraph @

google/rpc/context/attribute_context_pb2.pyi

raw
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 any_pb2 as _any_pb2
22 from google.protobuf import descriptor as _descriptor
23 from google.protobuf import duration_pb2 as _duration_pb2
24 from google.protobuf import message as _message
25 from google.protobuf import struct_pb2 as _struct_pb2
26 from google.protobuf import timestamp_pb2 as _timestamp_pb2
27 from google.protobuf.internal import containers as _containers
28
29 DESCRIPTOR: _descriptor.FileDescriptor
30
31 class AttributeContext(_message.Message):
32 __slots__ = (
33 "origin",
34 "source",
35 "destination",
36 "request",
37 "response",
38 "resource",
39 "api",
40 "extensions",
41 )
42 class Peer(_message.Message):
43 __slots__ = ("ip", "port", "labels", "principal", "region_code")
44 class LabelsEntry(_message.Message):
45 __slots__ = ("key", "value")
46 KEY_FIELD_NUMBER: _ClassVar[int]
47 VALUE_FIELD_NUMBER: _ClassVar[int]
48 key: str
49 value: str
50 def __init__(
51 self, key: _Optional[str] = ..., value: _Optional[str] = ...
52 ) -> None: ...
53
54 IP_FIELD_NUMBER: _ClassVar[int]
55 PORT_FIELD_NUMBER: _ClassVar[int]
56 LABELS_FIELD_NUMBER: _ClassVar[int]
57 PRINCIPAL_FIELD_NUMBER: _ClassVar[int]
58 REGION_CODE_FIELD_NUMBER: _ClassVar[int]
59 ip: str
60 port: int
61 labels: _containers.ScalarMap[str, str]
62 principal: str
63 region_code: str
64 def __init__(
65 self,
66 ip: _Optional[str] = ...,
67 port: _Optional[int] = ...,
68 labels: _Optional[_Mapping[str, str]] = ...,
69 principal: _Optional[str] = ...,
70 region_code: _Optional[str] = ...,
71 ) -> None: ...
72
73 class Api(_message.Message):
74 __slots__ = ("service", "operation", "protocol", "version")
75 SERVICE_FIELD_NUMBER: _ClassVar[int]
76 OPERATION_FIELD_NUMBER: _ClassVar[int]
77 PROTOCOL_FIELD_NUMBER: _ClassVar[int]
78 VERSION_FIELD_NUMBER: _ClassVar[int]
79 service: str
80 operation: str
81 protocol: str
82 version: str
83 def __init__(
84 self,
85 service: _Optional[str] = ...,
86 operation: _Optional[str] = ...,
87 protocol: _Optional[str] = ...,
88 version: _Optional[str] = ...,
89 ) -> None: ...
90
91 class Auth(_message.Message):
92 __slots__ = ("principal", "audiences", "presenter", "claims", "access_levels")
93 PRINCIPAL_FIELD_NUMBER: _ClassVar[int]
94 AUDIENCES_FIELD_NUMBER: _ClassVar[int]
95 PRESENTER_FIELD_NUMBER: _ClassVar[int]
96 CLAIMS_FIELD_NUMBER: _ClassVar[int]
97 ACCESS_LEVELS_FIELD_NUMBER: _ClassVar[int]
98 principal: str
99 audiences: _containers.RepeatedScalarFieldContainer[str]
100 presenter: str
101 claims: _struct_pb2.Struct
102 access_levels: _containers.RepeatedScalarFieldContainer[str]
103 def __init__(
104 self,
105 principal: _Optional[str] = ...,
106 audiences: _Optional[_Iterable[str]] = ...,
107 presenter: _Optional[str] = ...,
108 claims: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...,
109 access_levels: _Optional[_Iterable[str]] = ...,
110 ) -> None: ...
111
112 class Request(_message.Message):
113 __slots__ = (
114 "id",
115 "method",
116 "headers",
117 "path",
118 "host",
119 "scheme",
120 "query",
121 "time",
122 "size",
123 "protocol",
124 "reason",
125 "auth",
126 "origin",
127 )
128 class HeadersEntry(_message.Message):
129 __slots__ = ("key", "value")
130 KEY_FIELD_NUMBER: _ClassVar[int]
131 VALUE_FIELD_NUMBER: _ClassVar[int]
132 key: str
133 value: str
134 def __init__(
135 self, key: _Optional[str] = ..., value: _Optional[str] = ...
136 ) -> None: ...
137
138 ID_FIELD_NUMBER: _ClassVar[int]
139 METHOD_FIELD_NUMBER: _ClassVar[int]
140 HEADERS_FIELD_NUMBER: _ClassVar[int]
141 PATH_FIELD_NUMBER: _ClassVar[int]
142 HOST_FIELD_NUMBER: _ClassVar[int]
143 SCHEME_FIELD_NUMBER: _ClassVar[int]
144 QUERY_FIELD_NUMBER: _ClassVar[int]
145 TIME_FIELD_NUMBER: _ClassVar[int]
146 SIZE_FIELD_NUMBER: _ClassVar[int]
147 PROTOCOL_FIELD_NUMBER: _ClassVar[int]
148 REASON_FIELD_NUMBER: _ClassVar[int]
149 AUTH_FIELD_NUMBER: _ClassVar[int]
150 ORIGIN_FIELD_NUMBER: _ClassVar[int]
151 id: str
152 method: str
153 headers: _containers.ScalarMap[str, str]
154 path: str
155 host: str
156 scheme: str
157 query: str
158 time: _timestamp_pb2.Timestamp
159 size: int
160 protocol: str
161 reason: str
162 auth: AttributeContext.Auth
163 origin: str
164 def __init__(
165 self,
166 id: _Optional[str] = ...,
167 method: _Optional[str] = ...,
168 headers: _Optional[_Mapping[str, str]] = ...,
169 path: _Optional[str] = ...,
170 host: _Optional[str] = ...,
171 scheme: _Optional[str] = ...,
172 query: _Optional[str] = ...,
173 time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
174 size: _Optional[int] = ...,
175 protocol: _Optional[str] = ...,
176 reason: _Optional[str] = ...,
177 auth: _Optional[_Union[AttributeContext.Auth, _Mapping]] = ...,
178 origin: _Optional[str] = ...,
179 ) -> None: ...
180
181 class Response(_message.Message):
182 __slots__ = ("code", "size", "headers", "time", "backend_latency")
183 class HeadersEntry(_message.Message):
184 __slots__ = ("key", "value")
185 KEY_FIELD_NUMBER: _ClassVar[int]
186 VALUE_FIELD_NUMBER: _ClassVar[int]
187 key: str
188 value: str
189 def __init__(
190 self, key: _Optional[str] = ..., value: _Optional[str] = ...
191 ) -> None: ...
192
193 CODE_FIELD_NUMBER: _ClassVar[int]
194 SIZE_FIELD_NUMBER: _ClassVar[int]
195 HEADERS_FIELD_NUMBER: _ClassVar[int]
196 TIME_FIELD_NUMBER: _ClassVar[int]
197 BACKEND_LATENCY_FIELD_NUMBER: _ClassVar[int]
198 code: int
199 size: int
200 headers: _containers.ScalarMap[str, str]
201 time: _timestamp_pb2.Timestamp
202 backend_latency: _duration_pb2.Duration
203 def __init__(
204 self,
205 code: _Optional[int] = ...,
206 size: _Optional[int] = ...,
207 headers: _Optional[_Mapping[str, str]] = ...,
208 time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
209 backend_latency: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...,
210 ) -> None: ...
211
212 class Resource(_message.Message):
213 __slots__ = (
214 "service",
215 "name",
216 "type",
217 "labels",
218 "uid",
219 "annotations",
220 "display_name",
221 "create_time",
222 "update_time",
223 "delete_time",
224 "etag",
225 "location",
226 )
227 class LabelsEntry(_message.Message):
228 __slots__ = ("key", "value")
229 KEY_FIELD_NUMBER: _ClassVar[int]
230 VALUE_FIELD_NUMBER: _ClassVar[int]
231 key: str
232 value: str
233 def __init__(
234 self, key: _Optional[str] = ..., value: _Optional[str] = ...
235 ) -> None: ...
236
237 class AnnotationsEntry(_message.Message):
238 __slots__ = ("key", "value")
239 KEY_FIELD_NUMBER: _ClassVar[int]
240 VALUE_FIELD_NUMBER: _ClassVar[int]
241 key: str
242 value: str
243 def __init__(
244 self, key: _Optional[str] = ..., value: _Optional[str] = ...
245 ) -> None: ...
246
247 SERVICE_FIELD_NUMBER: _ClassVar[int]
248 NAME_FIELD_NUMBER: _ClassVar[int]
249 TYPE_FIELD_NUMBER: _ClassVar[int]
250 LABELS_FIELD_NUMBER: _ClassVar[int]
251 UID_FIELD_NUMBER: _ClassVar[int]
252 ANNOTATIONS_FIELD_NUMBER: _ClassVar[int]
253 DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]
254 CREATE_TIME_FIELD_NUMBER: _ClassVar[int]
255 UPDATE_TIME_FIELD_NUMBER: _ClassVar[int]
256 DELETE_TIME_FIELD_NUMBER: _ClassVar[int]
257 ETAG_FIELD_NUMBER: _ClassVar[int]
258 LOCATION_FIELD_NUMBER: _ClassVar[int]
259 service: str
260 name: str
261 type: str
262 labels: _containers.ScalarMap[str, str]
263 uid: str
264 annotations: _containers.ScalarMap[str, str]
265 display_name: str
266 create_time: _timestamp_pb2.Timestamp
267 update_time: _timestamp_pb2.Timestamp
268 delete_time: _timestamp_pb2.Timestamp
269 etag: str
270 location: str
271 def __init__(
272 self,
273 service: _Optional[str] = ...,
274 name: _Optional[str] = ...,
275 type: _Optional[str] = ...,
276 labels: _Optional[_Mapping[str, str]] = ...,
277 uid: _Optional[str] = ...,
278 annotations: _Optional[_Mapping[str, str]] = ...,
279 display_name: _Optional[str] = ...,
280 create_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
281 update_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
282 delete_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...,
283 etag: _Optional[str] = ...,
284 location: _Optional[str] = ...,
285 ) -> None: ...
286
287 ORIGIN_FIELD_NUMBER: _ClassVar[int]
288 SOURCE_FIELD_NUMBER: _ClassVar[int]
289 DESTINATION_FIELD_NUMBER: _ClassVar[int]
290 REQUEST_FIELD_NUMBER: _ClassVar[int]
291 RESPONSE_FIELD_NUMBER: _ClassVar[int]
292 RESOURCE_FIELD_NUMBER: _ClassVar[int]
293 API_FIELD_NUMBER: _ClassVar[int]
294 EXTENSIONS_FIELD_NUMBER: _ClassVar[int]
295 origin: AttributeContext.Peer
296 source: AttributeContext.Peer
297 destination: AttributeContext.Peer
298 request: AttributeContext.Request
299 response: AttributeContext.Response
300 resource: AttributeContext.Resource
301 api: AttributeContext.Api
302 extensions: _containers.RepeatedCompositeFieldContainer[_any_pb2.Any]
303 def __init__(
304 self,
305 origin: _Optional[_Union[AttributeContext.Peer, _Mapping]] = ...,
306 source: _Optional[_Union[AttributeContext.Peer, _Mapping]] = ...,
307 destination: _Optional[_Union[AttributeContext.Peer, _Mapping]] = ...,
308 request: _Optional[_Union[AttributeContext.Request, _Mapping]] = ...,
309 response: _Optional[_Union[AttributeContext.Response, _Mapping]] = ...,
310 resource: _Optional[_Union[AttributeContext.Resource, _Mapping]] = ...,
311 api: _Optional[_Union[AttributeContext.Api, _Mapping]] = ...,
312 extensions: _Optional[_Iterable[_Union[_any_pb2.Any, _Mapping]]] = ...,
313 ) -> None: ...