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 typegoogle.logging.type.HttpRequest- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRequest.BuilderA 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<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intCACHE_FILL_BYTES_FIELD_NUMBERstatic intCACHE_HIT_FIELD_NUMBERstatic intCACHE_LOOKUP_FIELD_NUMBERstatic intCACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBERstatic intLATENCY_FIELD_NUMBERstatic intPROTOCOL_FIELD_NUMBERstatic intREFERER_FIELD_NUMBERstatic intREMOTE_IP_FIELD_NUMBERstatic intREQUEST_METHOD_FIELD_NUMBERstatic intREQUEST_SIZE_FIELD_NUMBERstatic intREQUEST_URL_FIELD_NUMBERstatic intRESPONSE_SIZE_FIELD_NUMBERstatic intSERVER_IP_FIELD_NUMBERstatic intSTATUS_FIELD_NUMBERstatic intUSER_AGENT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)longgetCacheFillBytes()The number of HTTP response bytes inserted into cache.booleangetCacheHit()Whether or not an entity was served from cache (with or without validation).booleangetCacheLookup()Whether or not a cache lookup was attempted.booleangetCacheValidatedWithOriginServer()Whether or not the response was validated with the origin server before being served from cache.static HttpRequestgetDefaultInstance()HttpRequestgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.DurationgetLatency()The request processing latency on the server, from the time the request was received until the response was sent.com.google.protobuf.DurationOrBuildergetLatencyOrBuilder()The request processing latency on the server, from the time the request was received until the response was sent.com.google.protobuf.Parser<HttpRequest>getParserForType()StringgetProtocol()Protocol used for the request.com.google.protobuf.ByteStringgetProtocolBytes()Protocol used for the request.StringgetReferer()The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).com.google.protobuf.ByteStringgetRefererBytes()The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).StringgetRemoteIp()The IP address (IPv4 or IPv6) of the client that issued the HTTP request.com.google.protobuf.ByteStringgetRemoteIpBytes()The IP address (IPv4 or IPv6) of the client that issued the HTTP request.StringgetRequestMethod()The request method.com.google.protobuf.ByteStringgetRequestMethodBytes()The request method.longgetRequestSize()The size of the HTTP request message in bytes, including the request headers and the request body.StringgetRequestUrl()The scheme (http, https), the host name, the path and the query portion of the URL that was requested.com.google.protobuf.ByteStringgetRequestUrlBytes()The scheme (http, https), the host name, the path and the query portion of the URL that was requested.longgetResponseSize()The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.intgetSerializedSize()StringgetServerIp()The IP address (IPv4 or IPv6) of the origin server that the request was sent to.com.google.protobuf.ByteStringgetServerIpBytes()The IP address (IPv4 or IPv6) of the origin server that the request was sent to.intgetStatus()The response code indicating the status of response.com.google.protobuf.UnknownFieldSetgetUnknownFields()StringgetUserAgent()The user agent sent by the client.com.google.protobuf.ByteStringgetUserAgentBytes()The user agent sent by the client.inthashCode()booleanhasLatency()The request processing latency on the server, from the time the request was received until the response was sent.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static HttpRequest.BuildernewBuilder()static HttpRequest.BuildernewBuilder(HttpRequest prototype)HttpRequest.BuildernewBuilderForType()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()HttpRequest.BuildertoBuilder()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, 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
-
-
-
-
Field Detail
-
REQUEST_METHOD_FIELD_NUMBER
public static final int REQUEST_METHOD_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUEST_URL_FIELD_NUMBER
public static final int REQUEST_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUEST_SIZE_FIELD_NUMBER
public static final int REQUEST_SIZE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESPONSE_SIZE_FIELD_NUMBER
public static final int RESPONSE_SIZE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
USER_AGENT_FIELD_NUMBER
public static final int USER_AGENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REMOTE_IP_FIELD_NUMBER
public static final int REMOTE_IP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SERVER_IP_FIELD_NUMBER
public static final int SERVER_IP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REFERER_FIELD_NUMBER
public static final int REFERER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LATENCY_FIELD_NUMBER
public static final int LATENCY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CACHE_LOOKUP_FIELD_NUMBER
public static final int CACHE_LOOKUP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CACHE_HIT_FIELD_NUMBER
public static final int CACHE_HIT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER
public static final int CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CACHE_FILL_BYTES_FIELD_NUMBER
public static final int CACHE_FILL_BYTES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PROTOCOL_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- 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
public String 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
public String 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
public String 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
public String 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
public String 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
public String getReferer()
The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
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](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
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
public String 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
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- 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
public boolean equals(Object obj)
- 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
public static HttpRequest parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static HttpRequest parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static HttpRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static HttpRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public HttpRequest.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static HttpRequest.Builder newBuilder()
-
newBuilder
public static HttpRequest.Builder newBuilder(HttpRequest prototype)
-
toBuilder
public HttpRequest.Builder 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
public static HttpRequest getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<HttpRequest> parser()
-
getParserForType
public com.google.protobuf.Parser<HttpRequest> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public HttpRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-