Package com.google.rpc.context
Class AttributeContext.Request
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<AttributeContext.Request,AttributeContext.Request.Builder>
com.google.rpc.context.AttributeContext.Request
- All Implemented Interfaces:
com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,AttributeContext.RequestOrBuilder
- Enclosing class:
- AttributeContext
public static final class AttributeContext.Request
extends com.google.protobuf.GeneratedMessageLite<AttributeContext.Request,AttributeContext.Request.Builder>
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
This message defines attributes for an HTTP request.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,
?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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.GeneratedMessageLite
unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsHeaders
(String key) The HTTP request headers.protected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) getAuth()
The request authentication.static AttributeContext.Request
Deprecated.int
The HTTP request headers.The HTTP request headers.getHeadersOrDefault
(String key, String defaultValue) The HTTP request headers.getHeadersOrThrow
(String key) The HTTP request headers.getHost()
The HTTP request `Host` header value.com.google.protobuf.ByteString
The HTTP request `Host` header value.getId()
The unique ID for a request, which can be propagated to downstream systems.com.google.protobuf.ByteString
The unique ID for a request, which can be propagated to downstream systems.The HTTP request method, such as `GET`, `POST`.com.google.protobuf.ByteString
The HTTP request method, such as `GET`, `POST`.getPath()
The HTTP URL path, excluding the query parameters.com.google.protobuf.ByteString
The HTTP URL path, excluding the query parameters.The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".com.google.protobuf.ByteString
The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".getQuery()
The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request.com.google.protobuf.ByteString
The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request.A special parameter for request reason.com.google.protobuf.ByteString
A special parameter for request reason.The HTTP URL scheme, such as `http` and `https`.com.google.protobuf.ByteString
The HTTP URL scheme, such as `http` and `https`.long
getSize()
The HTTP request size in bytes.com.google.protobuf.Timestamp
getTime()
The timestamp when the `destination` service receives the last byte of the request.boolean
hasAuth()
The request authentication.boolean
hasTime()
The timestamp when the `destination` service receives the last byte of the request.newBuilder
(AttributeContext.Request prototype) static AttributeContext.Request
parseDelimitedFrom
(InputStream input) static AttributeContext.Request
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.Request
parseFrom
(byte[] data) static AttributeContext.Request
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.Request
parseFrom
(com.google.protobuf.ByteString data) static AttributeContext.Request
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.Request
parseFrom
(com.google.protobuf.CodedInputStream input) static AttributeContext.Request
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.Request
parseFrom
(InputStream input) static AttributeContext.Request
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.Request
parseFrom
(ByteBuffer data) static AttributeContext.Request
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<AttributeContext.Request>
parser()
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
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.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
METHOD_FIELD_NUMBER
public static final int METHOD_FIELD_NUMBER- See Also:
-
HEADERS_FIELD_NUMBER
public static final int HEADERS_FIELD_NUMBER- See Also:
-
PATH_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER- See Also:
-
HOST_FIELD_NUMBER
public static final int HOST_FIELD_NUMBER- See Also:
-
SCHEME_FIELD_NUMBER
public static final int SCHEME_FIELD_NUMBER- See Also:
-
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER- See Also:
-
TIME_FIELD_NUMBER
public static final int TIME_FIELD_NUMBER- See Also:
-
SIZE_FIELD_NUMBER
public static final int SIZE_FIELD_NUMBER- See Also:
-
PROTOCOL_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER- See Also:
-
REASON_FIELD_NUMBER
public static final int REASON_FIELD_NUMBER- See Also:
-
AUTH_FIELD_NUMBER
public static final int AUTH_FIELD_NUMBER- See Also:
-
-
Method Details
-
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 [json_name = "id"];
- Specified by:
getId
in interfaceAttributeContext.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 [json_name = "id"];
- Specified by:
getIdBytes
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The bytes for id.
-
getMethod
The HTTP request method, such as `GET`, `POST`.
string method = 2 [json_name = "method"];
- Specified by:
getMethod
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The method.
-
getMethodBytes
public com.google.protobuf.ByteString getMethodBytes()The HTTP request method, such as `GET`, `POST`.
string method = 2 [json_name = "method"];
- Specified by:
getMethodBytes
in interfaceAttributeContext.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 [json_name = "headers"];
- Specified by:
getHeadersCount
in interfaceAttributeContext.RequestOrBuilder
-
containsHeaders
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 [json_name = "headers"];
- Specified by:
containsHeaders
in interfaceAttributeContext.RequestOrBuilder
-
getHeaders
Deprecated.UsegetHeadersMap()
instead.- Specified by:
getHeaders
in interfaceAttributeContext.RequestOrBuilder
-
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 [json_name = "headers"];
- Specified by:
getHeadersMap
in interfaceAttributeContext.RequestOrBuilder
-
getHeadersOrDefault
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 [json_name = "headers"];
- Specified by:
getHeadersOrDefault
in interfaceAttributeContext.RequestOrBuilder
-
getHeadersOrThrow
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 [json_name = "headers"];
- Specified by:
getHeadersOrThrow
in interfaceAttributeContext.RequestOrBuilder
-
getPath
The HTTP URL path, excluding the query parameters.
string path = 4 [json_name = "path"];
- Specified by:
getPath
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The path.
-
getPathBytes
public com.google.protobuf.ByteString getPathBytes()The HTTP URL path, excluding the query parameters.
string path = 4 [json_name = "path"];
- Specified by:
getPathBytes
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The bytes for path.
-
getHost
The HTTP request `Host` header value.
string host = 5 [json_name = "host"];
- Specified by:
getHost
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The host.
-
getHostBytes
public com.google.protobuf.ByteString getHostBytes()The HTTP request `Host` header value.
string host = 5 [json_name = "host"];
- Specified by:
getHostBytes
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The bytes for host.
-
getScheme
The HTTP URL scheme, such as `http` and `https`.
string scheme = 6 [json_name = "scheme"];
- Specified by:
getScheme
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The scheme.
-
getSchemeBytes
public com.google.protobuf.ByteString getSchemeBytes()The HTTP URL scheme, such as `http` and `https`.
string scheme = 6 [json_name = "scheme"];
- Specified by:
getSchemeBytes
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The bytes for scheme.
-
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 [json_name = "query"];
- Specified by:
getQuery
in interfaceAttributeContext.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 [json_name = "query"];
- Specified by:
getQueryBytes
in interfaceAttributeContext.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 [json_name = "time"];
- Specified by:
hasTime
in interfaceAttributeContext.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 [json_name = "time"];
- Specified by:
getTime
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The time.
-
getSize
public long getSize()The HTTP request size in bytes. If unknown, it must be -1.
int64 size = 10 [json_name = "size"];
- Specified by:
getSize
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The size.
-
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 [json_name = "protocol"];
- Specified by:
getProtocol
in interfaceAttributeContext.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 [json_name = "protocol"];
- Specified by:
getProtocolBytes
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The bytes for protocol.
-
getReason
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
string reason = 12 [json_name = "reason"];
- Specified by:
getReason
in interfaceAttributeContext.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 [json_name = "reason"];
- Specified by:
getReasonBytes
in interfaceAttributeContext.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 [json_name = "auth"];
- Specified by:
hasAuth
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- Whether the auth field is set.
-
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 [json_name = "auth"];
- Specified by:
getAuth
in interfaceAttributeContext.RequestOrBuilder
- Returns:
- The auth.
-
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
-
parseFrom
- Throws:
IOException
-
parseFrom
public static AttributeContext.Request parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static AttributeContext.Request parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static AttributeContext.Request parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static AttributeContext.Request parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<AttributeContext.Request,
AttributeContext.Request.Builder>
-
getDefaultInstance
-
parser
-