public final class HttpRequest extends 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
Modifier and Type | Class and Description |
---|---|
static class |
HttpRequest.Builder
A common proto for logging HTTP requests.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable
Modifier and Type | Field and Description |
---|---|
static int |
CACHE_FILL_BYTES_FIELD_NUMBER |
static int |
CACHE_HIT_FIELD_NUMBER |
static int |
CACHE_LOOKUP_FIELD_NUMBER |
static int |
CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER |
static int |
LATENCY_FIELD_NUMBER |
static int |
PROTOCOL_FIELD_NUMBER |
static int |
REFERER_FIELD_NUMBER |
static int |
REMOTE_IP_FIELD_NUMBER |
static int |
REQUEST_METHOD_FIELD_NUMBER |
static int |
REQUEST_SIZE_FIELD_NUMBER |
static int |
REQUEST_URL_FIELD_NUMBER |
static int |
RESPONSE_SIZE_FIELD_NUMBER |
static int |
SERVER_IP_FIELD_NUMBER |
static int |
STATUS_FIELD_NUMBER |
static int |
USER_AGENT_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
long |
getCacheFillBytes()
The number of HTTP response bytes inserted into cache.
|
boolean |
getCacheHit()
Whether or not an entity was served from cache
(with or without validation).
|
boolean |
getCacheLookup()
Whether or not a cache lookup was attempted.
|
boolean |
getCacheValidatedWithOriginServer()
Whether or not the response was validated with the origin server before
being served from cache.
|
static HttpRequest |
getDefaultInstance() |
HttpRequest |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Duration |
getLatency()
The request processing latency on the server, from the time the request was
received until the response was sent.
|
DurationOrBuilder |
getLatencyOrBuilder()
The request processing latency on the server, from the time the request was
received until the response was sent.
|
Parser<HttpRequest> |
getParserForType() |
java.lang.String |
getProtocol()
Protocol used for the request.
|
ByteString |
getProtocolBytes()
Protocol used for the request.
|
java.lang.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).
|
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).
|
java.lang.String |
getRemoteIp()
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request.
|
ByteString |
getRemoteIpBytes()
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request.
|
java.lang.String |
getRequestMethod()
The request method.
|
ByteString |
getRequestMethodBytes()
The request method.
|
long |
getRequestSize()
The size of the HTTP request message in bytes, including the request
headers and the request body.
|
java.lang.String |
getRequestUrl()
The scheme (http, https), the host name, the path and the query
portion of the URL that was requested.
|
ByteString |
getRequestUrlBytes()
The scheme (http, https), the host name, the path and the query
portion of the URL that was requested.
|
long |
getResponseSize()
The size of the HTTP response message sent back to the client, in bytes,
including the response headers and the response body.
|
int |
getSerializedSize() |
java.lang.String |
getServerIp()
The IP address (IPv4 or IPv6) of the origin server that the request was
sent to.
|
ByteString |
getServerIpBytes()
The IP address (IPv4 or IPv6) of the origin server that the request was
sent to.
|
int |
getStatus()
The response code indicating the status of response.
|
UnknownFieldSet |
getUnknownFields() |
java.lang.String |
getUserAgent()
The user agent sent by the client.
|
ByteString |
getUserAgentBytes()
The user agent sent by the client.
|
int |
hashCode() |
boolean |
hasLatency()
The request processing latency on the server, from the time the request was
received until the response was sent.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static HttpRequest.Builder |
newBuilder() |
static HttpRequest.Builder |
newBuilder(HttpRequest prototype) |
HttpRequest.Builder |
newBuilderForType() |
protected HttpRequest.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
static HttpRequest |
parseDelimitedFrom(java.io.InputStream input) |
static HttpRequest |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static HttpRequest |
parseFrom(byte[] data) |
static HttpRequest |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static HttpRequest |
parseFrom(java.nio.ByteBuffer data) |
static HttpRequest |
parseFrom(java.nio.ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static HttpRequest |
parseFrom(ByteString data) |
static HttpRequest |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static HttpRequest |
parseFrom(CodedInputStream input) |
static HttpRequest |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static HttpRequest |
parseFrom(java.io.InputStream input) |
static HttpRequest |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<HttpRequest> |
parser() |
HttpRequest.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int REQUEST_METHOD_FIELD_NUMBER
public static final int REQUEST_URL_FIELD_NUMBER
public static final int REQUEST_SIZE_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
public static final int RESPONSE_SIZE_FIELD_NUMBER
public static final int USER_AGENT_FIELD_NUMBER
public static final int REMOTE_IP_FIELD_NUMBER
public static final int SERVER_IP_FIELD_NUMBER
public static final int REFERER_FIELD_NUMBER
public static final int LATENCY_FIELD_NUMBER
public static final int CACHE_LOOKUP_FIELD_NUMBER
public static final int CACHE_HIT_FIELD_NUMBER
public static final int CACHE_VALIDATED_WITH_ORIGIN_SERVER_FIELD_NUMBER
public static final int CACHE_FILL_BYTES_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public java.lang.String getRequestMethod()
The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
getRequestMethod
in interface HttpRequestOrBuilder
public ByteString getRequestMethodBytes()
The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
getRequestMethodBytes
in interface HttpRequestOrBuilder
public java.lang.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;
getRequestUrl
in interface HttpRequestOrBuilder
public 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;
getRequestUrlBytes
in interface HttpRequestOrBuilder
public long getRequestSize()
The size of the HTTP request message in bytes, including the request headers and the request body.
int64 request_size = 3;
getRequestSize
in interface HttpRequestOrBuilder
public int getStatus()
The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
getStatus
in interface HttpRequestOrBuilder
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;
getResponseSize
in interface HttpRequestOrBuilder
public java.lang.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;
getUserAgent
in interface HttpRequestOrBuilder
public 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;
getUserAgentBytes
in interface HttpRequestOrBuilder
public java.lang.String getRemoteIp()
The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
getRemoteIp
in interface HttpRequestOrBuilder
public ByteString getRemoteIpBytes()
The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
getRemoteIpBytes
in interface HttpRequestOrBuilder
public java.lang.String getServerIp()
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
string server_ip = 13;
getServerIp
in interface HttpRequestOrBuilder
public ByteString getServerIpBytes()
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
string server_ip = 13;
getServerIpBytes
in interface HttpRequestOrBuilder
public java.lang.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;
getReferer
in interface HttpRequestOrBuilder
public 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;
getRefererBytes
in interface HttpRequestOrBuilder
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;
hasLatency
in interface HttpRequestOrBuilder
public 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;
getLatency
in interface HttpRequestOrBuilder
public 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;
getLatencyOrBuilder
in interface HttpRequestOrBuilder
public boolean getCacheLookup()
Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
getCacheLookup
in interface HttpRequestOrBuilder
public boolean getCacheHit()
Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
getCacheHit
in interface HttpRequestOrBuilder
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;
getCacheValidatedWithOriginServer
in interface HttpRequestOrBuilder
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;
getCacheFillBytes
in interface HttpRequestOrBuilder
public java.lang.String getProtocol()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
getProtocol
in interface HttpRequestOrBuilder
public ByteString getProtocolBytes()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
getProtocolBytes
in interface HttpRequestOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static HttpRequest parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static HttpRequest parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static HttpRequest parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static HttpRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static HttpRequest parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static HttpRequest parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static HttpRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public HttpRequest.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static HttpRequest.Builder newBuilder()
public static HttpRequest.Builder newBuilder(HttpRequest prototype)
public HttpRequest.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected HttpRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static HttpRequest getDefaultInstance()
public static Parser<HttpRequest> parser()
public Parser<HttpRequest> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public HttpRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder