codekingpro/portable-devtools
114k
1# Copyright 2025 Google LLC2#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 at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# 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 and13# limitations under the License.14 15from typing import ClassVar as _ClassVar16from typing import Iterable as _Iterable17from typing import Mapping as _Mapping18from typing import Optional as _Optional19from typing import Union as _Union20 21from google.protobuf import any_pb2 as _any_pb222from google.protobuf import descriptor as _descriptor23from google.protobuf import duration_pb2 as _duration_pb224from google.protobuf import message as _message25from google.protobuf import struct_pb2 as _struct_pb226from google.protobuf import timestamp_pb2 as _timestamp_pb227from google.protobuf.internal import containers as _containers28 29DESCRIPTOR: _descriptor.FileDescriptor30 31class 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: str49 value: str50 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: str60 port: int61 labels: _containers.ScalarMap[str, str]62 principal: str63 region_code: str64 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: str80 operation: str81 protocol: str82 version: str83 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: str99 audiences: _containers.RepeatedScalarFieldContainer[str]100 presenter: str101 claims: _struct_pb2.Struct102 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: str133 value: str134 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: str152 method: str153 headers: _containers.ScalarMap[str, str]154 path: str155 host: str156 scheme: str157 query: str158 time: _timestamp_pb2.Timestamp159 size: int160 protocol: str161 reason: str162 auth: AttributeContext.Auth163 origin: str164 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: str188 value: str189 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: int199 size: int200 headers: _containers.ScalarMap[str, str]201 time: _timestamp_pb2.Timestamp202 backend_latency: _duration_pb2.Duration203 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: str232 value: str233 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: str242 value: str243 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: str260 name: str261 type: str262 labels: _containers.ScalarMap[str, str]263 uid: str264 annotations: _containers.ScalarMap[str, str]265 display_name: str266 create_time: _timestamp_pb2.Timestamp267 update_time: _timestamp_pb2.Timestamp268 delete_time: _timestamp_pb2.Timestamp269 etag: str270 location: str271 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.Peer296 source: AttributeContext.Peer297 destination: AttributeContext.Peer298 request: AttributeContext.Request299 response: AttributeContext.Response300 resource: AttributeContext.Resource301 api: AttributeContext.Api302 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: ...314 