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 Classes
    Modifier and Type
    Class
    Description
    static 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<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

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    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
     
    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 Type
    Method
    Description
    boolean
     
    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 final com.google.protobuf.Descriptors.Descriptor
     
    The request processing latency on the server, from the time the request was received until the response was sent.
    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](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
    com.google.protobuf.ByteString
    The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
    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.
    final com.google.protobuf.UnknownFieldSet
     
    The user agent sent by the client.
    com.google.protobuf.ByteString
    The user agent sent by the client.
    int
     
    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
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<HttpRequest>
     
     
    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, 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

    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, 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

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.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 class com.google.protobuf.GeneratedMessageV3
    • getRequestMethod

      public String getRequestMethod()
       The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
       
      string request_method = 1;
      Specified by:
      getRequestMethod in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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:
      getRequestUrl in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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:
      getUserAgent in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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:
      getRemoteIp in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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:
      getServerIp in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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:
      getReferer in interface HttpRequestOrBuilder
      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:
      getRefererBytes in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      Returns:
      Whether the latency field is set.
    • 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;
      Specified by:
      getLatency in interface HttpRequestOrBuilder
      Returns:
      The latency.
    • 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;
      Specified by:
      getLatencyOrBuilder in interface HttpRequestOrBuilder
    • getCacheLookup

      public boolean getCacheLookup()
       Whether or not a cache lookup was attempted.
       
      bool cache_lookup = 11;
      Specified by:
      getCacheLookup in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      Returns:
      The cacheFillBytes.
    • getProtocol

      public String getProtocol()
       Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
       
      string protocol = 15;
      Specified by:
      getProtocol in interface HttpRequestOrBuilder
      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 interface HttpRequestOrBuilder
      Returns:
      The bytes for protocol.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static HttpRequest.Builder newBuilder()
    • newBuilder

      public static HttpRequest.Builder newBuilder(HttpRequest prototype)
    • toBuilder

      public HttpRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected HttpRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.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:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public HttpRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder