Package com.google.logging.type
Class HttpRequest
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.logging.type.HttpRequest
- All Implemented Interfaces:
HttpRequestOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class HttpRequest
extends com.google.protobuf.GeneratedMessageV3
implements HttpRequestOrBuilder
A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.Protobuf type
google.logging.type.HttpRequest
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A common proto for logging HTTP requests.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
long
The number of HTTP response bytes inserted into cache.boolean
Whether or not an entity was served from cache (with or without validation).boolean
Whether or not a cache lookup was attempted.boolean
Whether or not the response was validated with the origin server before being served from cache.static HttpRequest
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Duration
The request processing latency on the server, from the time the request was received until the response was sent.com.google.protobuf.DurationOrBuilder
The request processing latency on the server, from the time the request was received until the response was sent.com.google.protobuf.Parser<HttpRequest>
Protocol used for the request.com.google.protobuf.ByteString
Protocol used for the request.The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).com.google.protobuf.ByteString
The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).The IP address (IPv4 or IPv6) of the client that issued the HTTP request.com.google.protobuf.ByteString
The IP address (IPv4 or IPv6) of the client that issued the HTTP request.The request method.com.google.protobuf.ByteString
The request method.long
The size of the HTTP request message in bytes, including the request headers and the request body.The scheme (http, https), the host name, the path and the query portion of the URL that was requested.com.google.protobuf.ByteString
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.long
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.int
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.com.google.protobuf.ByteString
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.int
The response code indicating the status of response.The user agent sent by the client.com.google.protobuf.ByteString
The user agent sent by the client.int
hashCode()
boolean
The request processing latency on the server, from the time the request was received until the response was sent.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
static HttpRequest.Builder
static HttpRequest.Builder
newBuilder
(HttpRequest prototype) protected HttpRequest.Builder
newBuilderForType
(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected Object
newInstance
(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static HttpRequest
parseDelimitedFrom
(InputStream input) static HttpRequest
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequest
parseFrom
(byte[] data) static HttpRequest
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequest
parseFrom
(com.google.protobuf.ByteString data) static HttpRequest
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequest
parseFrom
(com.google.protobuf.CodedInputStream input) static HttpRequest
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequest
parseFrom
(InputStream input) static HttpRequest
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequest
parseFrom
(ByteBuffer data) static HttpRequest
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<HttpRequest>
parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
REQUEST_METHOD_FIELD_NUMBER
public static final int REQUEST_METHOD_FIELD_NUMBER- See Also:
-
REQUEST_URL_FIELD_NUMBER
public static final int REQUEST_URL_FIELD_NUMBER- See Also:
-
REQUEST_SIZE_FIELD_NUMBER
public static final int REQUEST_SIZE_FIELD_NUMBER- See Also:
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER- See Also:
-
RESPONSE_SIZE_FIELD_NUMBER
public static final int RESPONSE_SIZE_FIELD_NUMBER- See Also:
-
USER_AGENT_FIELD_NUMBER
public static final int USER_AGENT_FIELD_NUMBER- See Also:
-
REMOTE_IP_FIELD_NUMBER
public static final int REMOTE_IP_FIELD_NUMBER- See Also:
-
SERVER_IP_FIELD_NUMBER
public static final int SERVER_IP_FIELD_NUMBER- See Also:
-
REFERER_FIELD_NUMBER
public static final int REFERER_FIELD_NUMBER- See Also:
-
LATENCY_FIELD_NUMBER
public static final int LATENCY_FIELD_NUMBER- See Also:
-
CACHE_LOOKUP_FIELD_NUMBER
public static final int CACHE_LOOKUP_FIELD_NUMBER- See Also:
-
CACHE_HIT_FIELD_NUMBER
public static final int CACHE_HIT_FIELD_NUMBER- See Also:
-
CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER
public static final int CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER- See Also:
-
CACHE_FILL_BYTES_FIELD_NUMBER
public static final int CACHE_FILL_BYTES_FIELD_NUMBER- See Also:
-
PROTOCOL_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getRequestMethod
The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
- Specified by:
getRequestMethod
in interfaceHttpRequestOrBuilder
- Returns:
- The requestMethod.
-
getRequestMethodBytes
public com.google.protobuf.ByteString getRequestMethodBytes()The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
- Specified by:
getRequestMethodBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for requestMethod.
-
getRequestUrl
The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
string request_url = 2;
- Specified by:
getRequestUrl
in interfaceHttpRequestOrBuilder
- Returns:
- The requestUrl.
-
getRequestUrlBytes
public com.google.protobuf.ByteString getRequestUrlBytes()The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
string request_url = 2;
- Specified by:
getRequestUrlBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for requestUrl.
-
getRequestSize
public long getRequestSize()The size of the HTTP request message in bytes, including the request headers and the request body.
int64 request_size = 3;
- Specified by:
getRequestSize
in interfaceHttpRequestOrBuilder
- Returns:
- The requestSize.
-
getStatus
public int getStatus()The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
- Specified by:
getStatus
in interfaceHttpRequestOrBuilder
- Returns:
- The status.
-
getResponseSize
public long getResponseSize()The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
int64 response_size = 5;
- Specified by:
getResponseSize
in interfaceHttpRequestOrBuilder
- Returns:
- The responseSize.
-
getUserAgent
The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
string user_agent = 6;
- Specified by:
getUserAgent
in interfaceHttpRequestOrBuilder
- Returns:
- The userAgent.
-
getUserAgentBytes
public com.google.protobuf.ByteString getUserAgentBytes()The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
string user_agent = 6;
- Specified by:
getUserAgentBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for userAgent.
-
getRemoteIp
The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This field can include port information. Examples: `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
- Specified by:
getRemoteIp
in interfaceHttpRequestOrBuilder
- Returns:
- The remoteIp.
-
getRemoteIpBytes
public com.google.protobuf.ByteString getRemoteIpBytes()The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This field can include port information. Examples: `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
- Specified by:
getRemoteIpBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for remoteIp.
-
getServerIp
The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string server_ip = 13;
- Specified by:
getServerIp
in interfaceHttpRequestOrBuilder
- Returns:
- The serverIp.
-
getServerIpBytes
public com.google.protobuf.ByteString getServerIpBytes()The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string server_ip = 13;
- Specified by:
getServerIpBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for serverIp.
-
getReferer
The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
string referer = 8;
- Specified by:
getReferer
in interfaceHttpRequestOrBuilder
- Returns:
- The referer.
-
getRefererBytes
public com.google.protobuf.ByteString getRefererBytes()The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
string referer = 8;
- Specified by:
getRefererBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for referer.
-
hasLatency
public boolean hasLatency()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
- Specified by:
hasLatency
in interfaceHttpRequestOrBuilder
- Returns:
- Whether the latency field is set.
-
getLatency
public com.google.protobuf.Duration getLatency()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
- Specified by:
getLatency
in interfaceHttpRequestOrBuilder
- Returns:
- The latency.
-
getLatencyOrBuilder
public com.google.protobuf.DurationOrBuilder getLatencyOrBuilder()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
- Specified by:
getLatencyOrBuilder
in interfaceHttpRequestOrBuilder
-
getCacheLookup
public boolean getCacheLookup()Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
- Specified by:
getCacheLookup
in interfaceHttpRequestOrBuilder
- Returns:
- The cacheLookup.
-
getCacheHit
public boolean getCacheHit()Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
- Specified by:
getCacheHit
in interfaceHttpRequestOrBuilder
- Returns:
- The cacheHit.
-
getCacheValidatedWithOriginServer
public boolean getCacheValidatedWithOriginServer()Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.
bool cache_validated_with_origin_server = 10;
- Specified by:
getCacheValidatedWithOriginServer
in interfaceHttpRequestOrBuilder
- Returns:
- The cacheValidatedWithOriginServer.
-
getCacheFillBytes
public long getCacheFillBytes()The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
int64 cache_fill_bytes = 12;
- Specified by:
getCacheFillBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The cacheFillBytes.
-
getProtocol
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
- Specified by:
getProtocol
in interfaceHttpRequestOrBuilder
- Returns:
- The protocol.
-
getProtocolBytes
public com.google.protobuf.ByteString getProtocolBytes()Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
- Specified by:
getProtocolBytes
in interfaceHttpRequestOrBuilder
- Returns:
- The bytes for protocol.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static HttpRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HttpRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static HttpRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static HttpRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static HttpRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HttpRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-