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
Nested ClassesModifier and TypeClassDescriptionstatic final classA 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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongThe number of HTTP response bytes inserted into cache.booleanWhether or not an entity was served from cache (with or without validation).booleanWhether or not a cache lookup was attempted.booleanWhether or not the response was validated with the origin server before being served from cache.static HttpRequeststatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationThe request processing latency on the server, from the time the request was received until the response was sent.com.google.protobuf.DurationOrBuilderThe 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.ByteStringProtocol 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.ByteStringThe 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.ByteStringThe IP address (IPv4 or IPv6) of the client that issued the HTTP request.The request method.com.google.protobuf.ByteStringThe request method.longThe 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.ByteStringThe scheme (http, https), the host name, the path and the query portion of the URL that was requested.longThe size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.intThe IP address (IPv4 or IPv6) of the origin server that the request was sent to.com.google.protobuf.ByteStringThe IP address (IPv4 or IPv6) of the origin server that the request was sent to.intThe response code indicating the status of response.final com.google.protobuf.UnknownFieldSetThe user agent sent by the client.com.google.protobuf.ByteStringThe user agent sent by the client.inthashCode()booleanThe request processing latency on the server, from the time the request was received until the response was sent.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic HttpRequest.Builderstatic HttpRequest.BuildernewBuilder(HttpRequest prototype) protected HttpRequest.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static HttpRequestparseDelimitedFrom(InputStream input) static HttpRequestparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequestparseFrom(byte[] data) static HttpRequestparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequestparseFrom(com.google.protobuf.ByteString data) static HttpRequestparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequestparseFrom(com.google.protobuf.CodedInputStream input) static HttpRequestparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequestparseFrom(InputStream input) static HttpRequestparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HttpRequestparseFrom(ByteBuffer data) static HttpRequestparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<HttpRequest>parser()voidwriteTo(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, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, 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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRequestMethod
The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;- Specified by:
getRequestMethodin 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:
getRequestMethodBytesin 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:
getRequestUrlin 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:
getRequestUrlBytesin 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:
getRequestSizein interfaceHttpRequestOrBuilder- Returns:
- The requestSize.
-
getStatus
public int getStatus()The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;- Specified by:
getStatusin 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:
getResponseSizein 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:
getUserAgentin 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:
getUserAgentBytesin 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:
getRemoteIpin 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:
getRemoteIpBytesin 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:
getServerIpin 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:
getServerIpBytesin 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:
getRefererin 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:
getRefererBytesin 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:
hasLatencyin 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:
getLatencyin 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:
getLatencyOrBuilderin interfaceHttpRequestOrBuilder
-
getCacheLookup
public boolean getCacheLookup()Whether or not a cache lookup was attempted.
bool cache_lookup = 11;- Specified by:
getCacheLookupin 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:
getCacheHitin 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:
getCacheValidatedWithOriginServerin 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:
getCacheFillBytesin interfaceHttpRequestOrBuilder- Returns:
- The cacheFillBytes.
-
getProtocol
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;- Specified by:
getProtocolin 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:
getProtocolBytesin interfaceHttpRequestOrBuilder- Returns:
- The bytes for protocol.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HttpRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-