Class AttributeContext.Request

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContext.RequestOrBuilder, Serializable
    Enclosing class:
    AttributeContext

    public static final class AttributeContext.Request
    extends com.google.protobuf.GeneratedMessageV3
    implements AttributeContext.RequestOrBuilder
     This message defines attributes for an HTTP request. If the actual
     request is not an HTTP request, the runtime system should try to map
     the actual request to an equivalent HTTP request.
     
    Protobuf type google.rpc.context.AttributeContext.Request
    See Also:
    Serialized Form
    • Method Detail

      • 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()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField 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.
         
        string id = 1;
        Specified by:
        getId in interface AttributeContext.RequestOrBuilder
        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.
         
        string id = 1;
        Specified by:
        getIdBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for id.
      • getMethodBytes

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

        public int getHeadersCount()
        Description copied from interface: AttributeContext.RequestOrBuilder
         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
         lowercased, because HTTP header keys are case-insensitive.
         
        map<string, string> headers = 3;
        Specified by:
        getHeadersCount in interface AttributeContext.RequestOrBuilder
      • 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
         lowercased, because HTTP header keys are case-insensitive.
         
        map<string, string> headers = 3;
        Specified by:
        containsHeaders in interface AttributeContext.RequestOrBuilder
      • 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
         lowercased, because HTTP header keys are case-insensitive.
         
        map<string, string> headers = 3;
        Specified by:
        getHeadersMap in interface AttributeContext.RequestOrBuilder
      • 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
         lowercased, because HTTP header keys are case-insensitive.
         
        map<string, string> headers = 3;
        Specified by:
        getHeadersOrDefault in interface AttributeContext.RequestOrBuilder
      • 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
         lowercased, because HTTP header keys are case-insensitive.
         
        map<string, string> headers = 3;
        Specified by:
        getHeadersOrThrow in interface AttributeContext.RequestOrBuilder
      • getPathBytes

        public com.google.protobuf.ByteString getPathBytes()
         The HTTP URL path, excluding the query parameters.
         
        string path = 4;
        Specified by:
        getPathBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for path.
      • getHostBytes

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

        public com.google.protobuf.ByteString getSchemeBytes()
         The HTTP URL scheme, such as `http` and `https`.
         
        string scheme = 6;
        Specified by:
        getSchemeBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for scheme.
      • getQuery

        public String getQuery()
         The HTTP URL query in the format of `name1=value1&name2=value2`, as it
         appears in the first line of the HTTP request. No decoding is performed.
         
        string query = 7;
        Specified by:
        getQuery in interface AttributeContext.RequestOrBuilder
        Returns:
        The query.
      • getQueryBytes

        public com.google.protobuf.ByteString getQueryBytes()
         The HTTP URL query in the format of `name1=value1&name2=value2`, as it
         appears in the first line of the HTTP request. No decoding is performed.
         
        string query = 7;
        Specified by:
        getQueryBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for query.
      • hasTime

        public boolean hasTime()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
        Specified by:
        hasTime in interface AttributeContext.RequestOrBuilder
        Returns:
        Whether the time field is set.
      • getTime

        public com.google.protobuf.Timestamp getTime()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
        Specified by:
        getTime in interface AttributeContext.RequestOrBuilder
        Returns:
        The time.
      • getTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder()
         The timestamp when the `destination` service receives the last byte of
         the request.
         
        .google.protobuf.Timestamp time = 9;
        Specified by:
        getTimeOrBuilder in interface AttributeContext.RequestOrBuilder
      • getProtocol

        public String getProtocol()
         The network protocol used with the request, such as "http/1.1",
         "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
         https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
         for details.
         
        string protocol = 11;
        Specified by:
        getProtocol in interface AttributeContext.RequestOrBuilder
        Returns:
        The protocol.
      • getProtocolBytes

        public com.google.protobuf.ByteString getProtocolBytes()
         The network protocol used with the request, such as "http/1.1",
         "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See
         https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
         for details.
         
        string protocol = 11;
        Specified by:
        getProtocolBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for protocol.
      • getReason

        public String getReason()
         A special parameter for request reason. It is used by security systems
         to associate auditing information with a request.
         
        string reason = 12;
        Specified by:
        getReason in interface AttributeContext.RequestOrBuilder
        Returns:
        The reason.
      • getReasonBytes

        public com.google.protobuf.ByteString getReasonBytes()
         A special parameter for request reason. It is used by security systems
         to associate auditing information with a request.
         
        string reason = 12;
        Specified by:
        getReasonBytes in interface AttributeContext.RequestOrBuilder
        Returns:
        The bytes for reason.
      • hasAuth

        public boolean hasAuth()
         The request authentication. May be absent for unauthenticated requests.
         Derived from the HTTP request `Authorization` header or equivalent.
         
        .google.rpc.context.AttributeContext.Auth auth = 13;
        Specified by:
        hasAuth in interface AttributeContext.RequestOrBuilder
        Returns:
        Whether the auth field is set.
      • getAuth

        public AttributeContext.Auth getAuth()
         The request authentication. May be absent for unauthenticated requests.
         Derived from the HTTP request `Authorization` header or equivalent.
         
        .google.rpc.context.AttributeContext.Auth auth = 13;
        Specified by:
        getAuth in interface AttributeContext.RequestOrBuilder
        Returns:
        The auth.
      • 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.Request parseFrom​(ByteBuffer data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

        protected AttributeContext.Request.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

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