Class AttributeContext.HttpRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.service.auth.v2.AttributeContext.HttpRequest
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContext.HttpRequestOrBuilder, Serializable
Enclosing class:
AttributeContext

public static final class AttributeContext.HttpRequest extends com.google.protobuf.GeneratedMessageV3 implements AttributeContext.HttpRequestOrBuilder
 This message defines attributes for an HTTP request.
 HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests.
 [#next-free-field: 12]
 
Protobuf type envoy.service.auth.v2.AttributeContext.HttpRequest
See Also:
  • Field Details

  • Method Details

    • newInstance

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

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getId

      public String getId()
       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       For HTTP requests, it should be X-Request-ID or equivalent.
       
      string id = 1;
      Specified by:
      getId in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       The unique ID for a request, which can be propagated to downstream
       systems. The ID should have low probability of collision
       within a single day for a specific service.
       For HTTP requests, it should be X-Request-ID or equivalent.
       
      string id = 1;
      Specified by:
      getIdBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for id.
    • getMethod

      public String getMethod()
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2;
      Specified by:
      getMethod in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The method.
    • getMethodBytes

      public com.google.protobuf.ByteString getMethodBytes()
       The HTTP request method, such as `GET`, `POST`.
       
      string method = 2;
      Specified by:
      getMethodBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for method.
    • getHeadersCount

      public int getHeadersCount()
      Description copied from interface: AttributeContext.HttpRequestOrBuilder
       The HTTP request headers. If multiple headers share the same key, they
       must be merged according to the HTTP spec. All header keys must be
       lower-cased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersCount in interface AttributeContext.HttpRequestOrBuilder
    • containsHeaders

      public boolean containsHeaders(String key)
       The HTTP request headers. If multiple headers share the same key, they
       must be merged according to the HTTP spec. All header keys must be
       lower-cased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      containsHeaders in interface AttributeContext.HttpRequestOrBuilder
    • getHeaders

      @Deprecated public Map<String,String> getHeaders()
      Deprecated.
      Use getHeadersMap() instead.
      Specified by:
      getHeaders in interface AttributeContext.HttpRequestOrBuilder
    • getHeadersMap

      public Map<String,String> getHeadersMap()
       The HTTP request headers. If multiple headers share the same key, they
       must be merged according to the HTTP spec. All header keys must be
       lower-cased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersMap in interface AttributeContext.HttpRequestOrBuilder
    • getHeadersOrDefault

      public String getHeadersOrDefault(String key, String defaultValue)
       The HTTP request headers. If multiple headers share the same key, they
       must be merged according to the HTTP spec. All header keys must be
       lower-cased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersOrDefault in interface AttributeContext.HttpRequestOrBuilder
    • getHeadersOrThrow

      public String getHeadersOrThrow(String key)
       The HTTP request headers. If multiple headers share the same key, they
       must be merged according to the HTTP spec. All header keys must be
       lower-cased, because HTTP header keys are case-insensitive.
       
      map<string, string> headers = 3;
      Specified by:
      getHeadersOrThrow in interface AttributeContext.HttpRequestOrBuilder
    • getPath

      public String getPath()
       The request target, as it appears in the first line of the HTTP request. This includes
       the URL path and query-string. No decoding is performed.
       
      string path = 4;
      Specified by:
      getPath in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The path.
    • getPathBytes

      public com.google.protobuf.ByteString getPathBytes()
       The request target, as it appears in the first line of the HTTP request. This includes
       the URL path and query-string. No decoding is performed.
       
      string path = 4;
      Specified by:
      getPathBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for path.
    • getHost

      public String getHost()
       The HTTP request `Host` or 'Authority` header value.
       
      string host = 5;
      Specified by:
      getHost in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The host.
    • getHostBytes

      public com.google.protobuf.ByteString getHostBytes()
       The HTTP request `Host` or 'Authority` header value.
       
      string host = 5;
      Specified by:
      getHostBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for host.
    • getScheme

      public String getScheme()
       The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       the scheme of the request.
       
      string scheme = 6;
      Specified by:
      getScheme in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The scheme.
    • getSchemeBytes

      public com.google.protobuf.ByteString getSchemeBytes()
       The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2
       requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup
       the scheme of the request.
       
      string scheme = 6;
      Specified by:
      getSchemeBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for scheme.
    • getQuery

      public String getQuery()
       This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       included in `path` field.
       
      string query = 7;
      Specified by:
      getQuery in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The query.
    • getQueryBytes

      public com.google.protobuf.ByteString getQueryBytes()
       This field is always empty, and exists for compatibility reasons. The HTTP URL query is
       included in `path` field.
       
      string query = 7;
      Specified by:
      getQueryBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for query.
    • getFragment

      public String getFragment()
       This field is always empty, and exists for compatibility reasons. The URL fragment is
       not submitted as part of HTTP requests; it is unknowable.
       
      string fragment = 8;
      Specified by:
      getFragment in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The fragment.
    • getFragmentBytes

      public com.google.protobuf.ByteString getFragmentBytes()
       This field is always empty, and exists for compatibility reasons. The URL fragment is
       not submitted as part of HTTP requests; it is unknowable.
       
      string fragment = 8;
      Specified by:
      getFragmentBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for fragment.
    • getSize

      public long getSize()
       The HTTP request size in bytes. If unknown, it must be -1.
       
      int64 size = 9;
      Specified by:
      getSize in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The size.
    • getProtocol

      public String getProtocol()
       The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
      
       See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       possible values.
       
      string protocol = 10;
      Specified by:
      getProtocol in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The protocol.
    • getProtocolBytes

      public com.google.protobuf.ByteString getProtocolBytes()
       The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".
      
       See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all
       possible values.
       
      string protocol = 10;
      Specified by:
      getProtocolBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for protocol.
    • getBody

      public String getBody()
       The HTTP request body.
       
      string body = 11;
      Specified by:
      getBody in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The body.
    • getBodyBytes

      public com.google.protobuf.ByteString getBodyBytes()
       The HTTP request body.
       
      string body = 11;
      Specified by:
      getBodyBytes in interface AttributeContext.HttpRequestOrBuilder
      Returns:
      The bytes for body.
    • 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 AttributeContext.HttpRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AttributeContext.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 AttributeContext.HttpRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AttributeContext.HttpRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AttributeContext.HttpRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AttributeContext.HttpRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static AttributeContext.HttpRequest.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AttributeContext.HttpRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static AttributeContext.HttpRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AttributeContext.HttpRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<AttributeContext.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 AttributeContext.HttpRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder