| 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 Mapping as _Mapping |
| 17 |
from typing import Optional as _Optional |
| 18 |
from typing import Union as _Union |
| 19 |
|
| 20 |
from google.protobuf import descriptor as _descriptor |
| 21 |
from google.protobuf import duration_pb2 as _duration_pb2 |
| 22 |
from google.protobuf import message as _message |
| 23 |
|
| 24 |
DESCRIPTOR: _descriptor.FileDescriptor |
| 25 |
|
| 26 |
class HttpRequest(_message.Message): |
| 27 |
__slots__ = ( |
| 28 |
"request_method", |
| 29 |
"request_url", |
| 30 |
"request_size", |
| 31 |
"status", |
| 32 |
"response_size", |
| 33 |
"user_agent", |
| 34 |
"remote_ip", |
| 35 |
"server_ip", |
| 36 |
"referer", |
| 37 |
"latency", |
| 38 |
"cache_lookup", |
| 39 |
"cache_hit", |
| 40 |
"cache_validated_with_origin_server", |
| 41 |
"cache_fill_bytes", |
| 42 |
"protocol", |
| 43 |
) |
| 44 |
REQUEST_METHOD_FIELD_NUMBER: _ClassVar[int] |
| 45 |
REQUEST_URL_FIELD_NUMBER: _ClassVar[int] |
| 46 |
REQUEST_SIZE_FIELD_NUMBER: _ClassVar[int] |
| 47 |
STATUS_FIELD_NUMBER: _ClassVar[int] |
| 48 |
RESPONSE_SIZE_FIELD_NUMBER: _ClassVar[int] |
| 49 |
USER_AGENT_FIELD_NUMBER: _ClassVar[int] |
| 50 |
REMOTE_IP_FIELD_NUMBER: _ClassVar[int] |
| 51 |
SERVER_IP_FIELD_NUMBER: _ClassVar[int] |
| 52 |
REFERER_FIELD_NUMBER: _ClassVar[int] |
| 53 |
LATENCY_FIELD_NUMBER: _ClassVar[int] |
| 54 |
CACHE_LOOKUP_FIELD_NUMBER: _ClassVar[int] |
| 55 |
CACHE_HIT_FIELD_NUMBER: _ClassVar[int] |
| 56 |
CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER: _ClassVar[int] |
| 57 |
CACHE_FILL_BYTES_FIELD_NUMBER: _ClassVar[int] |
| 58 |
PROTOCOL_FIELD_NUMBER: _ClassVar[int] |
| 59 |
request_method: str |
| 60 |
request_url: str |
| 61 |
request_size: int |
| 62 |
status: int |
| 63 |
response_size: int |
| 64 |
user_agent: str |
| 65 |
remote_ip: str |
| 66 |
server_ip: str |
| 67 |
referer: str |
| 68 |
latency: _duration_pb2.Duration |
| 69 |
cache_lookup: bool |
| 70 |
cache_hit: bool |
| 71 |
cache_validated_with_origin_server: bool |
| 72 |
cache_fill_bytes: int |
| 73 |
protocol: str |
| 74 |
def __init__( |
| 75 |
self, |
| 76 |
request_method: _Optional[str] = ..., |
| 77 |
request_url: _Optional[str] = ..., |
| 78 |
request_size: _Optional[int] = ..., |
| 79 |
status: _Optional[int] = ..., |
| 80 |
response_size: _Optional[int] = ..., |
| 81 |
user_agent: _Optional[str] = ..., |
| 82 |
remote_ip: _Optional[str] = ..., |
| 83 |
server_ip: _Optional[str] = ..., |
| 84 |
referer: _Optional[str] = ..., |
| 85 |
latency: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., |
| 86 |
cache_lookup: bool = ..., |
| 87 |
cache_hit: bool = ..., |
| 88 |
cache_validated_with_origin_server: bool = ..., |
| 89 |
cache_fill_bytes: _Optional[int] = ..., |
| 90 |
protocol: _Optional[str] = ..., |
| 91 |
) -> None: ... |