public static final class HttpRequest.Builder extends GeneratedMessageV3.Builder<HttpRequest.Builder> 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > HttpRequest.BuilderImplements
HttpRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public HttpRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
HttpRequest.Builder |
build()
public HttpRequest build()
Type | Description |
HttpRequest |
buildPartial()
public HttpRequest buildPartial()
Type | Description |
HttpRequest |
clear()
public HttpRequest.Builder clear()
Type | Description |
HttpRequest.Builder |
clearCacheFillBytes()
public HttpRequest.Builder clearCacheFillBytes()
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
int64 cache_fill_bytes = 12;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearCacheHit()
public HttpRequest.Builder clearCacheHit()
Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearCacheLookup()
public HttpRequest.Builder clearCacheLookup()
Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearCacheValidatedWithOriginServer()
public HttpRequest.Builder clearCacheValidatedWithOriginServer()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public HttpRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
HttpRequest.Builder |
clearLatency()
public HttpRequest.Builder clearLatency()
The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
Type | Description |
HttpRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public HttpRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
HttpRequest.Builder |
clearProtocol()
public HttpRequest.Builder clearProtocol()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearReferer()
public HttpRequest.Builder clearReferer()
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
string referer = 8;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearRemoteIp()
public HttpRequest.Builder clearRemoteIp()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearRequestMethod()
public HttpRequest.Builder clearRequestMethod()
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
string request_method = 1;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearRequestSize()
public HttpRequest.Builder clearRequestSize()
The size of the HTTP request message in bytes, including the request headers and the request body.
int64 request_size = 3;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearRequestUrl()
public HttpRequest.Builder clearRequestUrl()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearResponseSize()
public HttpRequest.Builder clearResponseSize()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearServerIp()
public HttpRequest.Builder clearServerIp()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearStatus()
public HttpRequest.Builder clearStatus()
The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clearUserAgent()
public HttpRequest.Builder clearUserAgent()
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;
Type | Description |
HttpRequest.Builder | This builder for chaining. |
clone()
public HttpRequest.Builder clone()
Type | Description |
HttpRequest.Builder |
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;
Type | Description |
long | The cacheFillBytes. |
getCacheHit()
public boolean getCacheHit()
Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
Type | Description |
boolean | The cacheHit. |
getCacheLookup()
public boolean getCacheLookup()
Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
Type | Description |
boolean | The cacheLookup. |
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;
Type | Description |
boolean | The cacheValidatedWithOriginServer. |
getDefaultInstanceForType()
public HttpRequest getDefaultInstanceForType()
Type | Description |
HttpRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getLatency()
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;
Type | Description |
Duration | The latency. |
getLatencyBuilder()
public Duration.Builder getLatencyBuilder()
The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
Type | Description |
Builder |
getLatencyOrBuilder()
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;
Type | Description |
DurationOrBuilder |
getProtocol()
public String getProtocol()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
Type | Description |
String | The protocol. |
getProtocolBytes()
public ByteString getProtocolBytes()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
Type | Description |
ByteString | The bytes for protocol. |
getReferer()
public String getReferer()
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
string referer = 8;
Type | Description |
String | The referer. |
getRefererBytes()
public ByteString getRefererBytes()
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
string referer = 8;
Type | Description |
ByteString | The bytes for referer. |
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;
Type | Description |
String | The remoteIp. |
getRemoteIpBytes()
public 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;
Type | Description |
ByteString | The bytes for remoteIp. |
getRequestMethod()
public String getRequestMethod()
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
string request_method = 1;
Type | Description |
String | The requestMethod. |
getRequestMethodBytes()
public ByteString getRequestMethodBytes()
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
string request_method = 1;
Type | Description |
ByteString | The bytes for requestMethod. |
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;
Type | Description |
long | The requestSize. |
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;
Type | Description |
String | The requestUrl. |
getRequestUrlBytes()
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;
Type | Description |
ByteString | The bytes for requestUrl. |
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;
Type | Description |
long | The responseSize. |
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;
Type | Description |
String | The serverIp. |
getServerIpBytes()
public 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;
Type | Description |
ByteString | The bytes for serverIp. |
getStatus()
public int getStatus()
The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
Type | Description |
int | The status. |
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;
Type | Description |
String | The userAgent. |
getUserAgentBytes()
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;
Type | Description |
ByteString | The bytes for userAgent. |
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;
Type | Description |
boolean | Whether the latency field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(HttpRequest other)
public HttpRequest.Builder mergeFrom(HttpRequest other)
Name | Description |
other | HttpRequest |
Type | Description |
HttpRequest.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public HttpRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
HttpRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public HttpRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
HttpRequest.Builder |
mergeLatency(Duration value)
public HttpRequest.Builder mergeLatency(Duration value)
The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
Name | Description |
value | Duration |
Type | Description |
HttpRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final HttpRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
HttpRequest.Builder |
setCacheFillBytes(long value)
public HttpRequest.Builder setCacheFillBytes(long value)
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
int64 cache_fill_bytes = 12;
Name | Description |
value | long The cacheFillBytes to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setCacheHit(boolean value)
public HttpRequest.Builder setCacheHit(boolean value)
Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
Name | Description |
value | boolean The cacheHit to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setCacheLookup(boolean value)
public HttpRequest.Builder setCacheLookup(boolean value)
Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
Name | Description |
value | boolean The cacheLookup to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setCacheValidatedWithOriginServer(boolean value)
public HttpRequest.Builder setCacheValidatedWithOriginServer(boolean value)
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;
Name | Description |
value | boolean The cacheValidatedWithOriginServer to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public HttpRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
HttpRequest.Builder |
setLatency(Duration value)
public HttpRequest.Builder setLatency(Duration value)
The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
Name | Description |
value | Duration |
Type | Description |
HttpRequest.Builder |
setLatency(Duration.Builder builderForValue)
public HttpRequest.Builder setLatency(Duration.Builder builderForValue)
The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
Name | Description |
builderForValue | Builder |
Type | Description |
HttpRequest.Builder |
setProtocol(String value)
public HttpRequest.Builder setProtocol(String value)
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
Name | Description |
value | String The protocol to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setProtocolBytes(ByteString value)
public HttpRequest.Builder setProtocolBytes(ByteString value)
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
Name | Description |
value | ByteString The bytes for protocol to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setReferer(String value)
public HttpRequest.Builder setReferer(String value)
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
string referer = 8;
Name | Description |
value | String The referer to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRefererBytes(ByteString value)
public HttpRequest.Builder setRefererBytes(ByteString value)
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
string referer = 8;
Name | Description |
value | ByteString The bytes for referer to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRemoteIp(String value)
public HttpRequest.Builder setRemoteIp(String value)
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;
Name | Description |
value | String The remoteIp to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRemoteIpBytes(ByteString value)
public HttpRequest.Builder setRemoteIpBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes for remoteIp to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public HttpRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
HttpRequest.Builder |
setRequestMethod(String value)
public HttpRequest.Builder setRequestMethod(String value)
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
string request_method = 1;
Name | Description |
value | String The requestMethod to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRequestMethodBytes(ByteString value)
public HttpRequest.Builder setRequestMethodBytes(ByteString value)
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
string request_method = 1;
Name | Description |
value | ByteString The bytes for requestMethod to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRequestSize(long value)
public HttpRequest.Builder setRequestSize(long value)
The size of the HTTP request message in bytes, including the request headers and the request body.
int64 request_size = 3;
Name | Description |
value | long The requestSize to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRequestUrl(String value)
public HttpRequest.Builder setRequestUrl(String value)
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;
Name | Description |
value | String The requestUrl to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setRequestUrlBytes(ByteString value)
public HttpRequest.Builder setRequestUrlBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes for requestUrl to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setResponseSize(long value)
public HttpRequest.Builder setResponseSize(long value)
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;
Name | Description |
value | long The responseSize to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setServerIp(String value)
public HttpRequest.Builder setServerIp(String value)
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;
Name | Description |
value | String The serverIp to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setServerIpBytes(ByteString value)
public HttpRequest.Builder setServerIpBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes for serverIp to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setStatus(int value)
public HttpRequest.Builder setStatus(int value)
The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
Name | Description |
value | int The status to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final HttpRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
HttpRequest.Builder |
setUserAgent(String value)
public HttpRequest.Builder setUserAgent(String value)
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;
Name | Description |
value | String The userAgent to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |
setUserAgentBytes(ByteString value)
public HttpRequest.Builder setUserAgentBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes for userAgent to set. |
Type | Description |
HttpRequest.Builder | This builder for chaining. |