Package com.google.rpc.context
Class AttributeContext.Request.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext.Request,AttributeContext.Request.Builder>
com.google.rpc.context.AttributeContext.Request.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,AttributeContext.RequestOrBuilder
,Cloneable
- Enclosing class:
- AttributeContext.Request
public static final class AttributeContext.Request.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<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
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionThe request authentication.The HTTP request `Host` header value.clearId()
The unique ID for a request, which can be propagated to downstream systems.The HTTP request method, such as `GET`, `POST`.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".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.The HTTP URL scheme, such as `http` and `https`.The HTTP request size in bytes.The timestamp when the `destination` service receives the last byte of the request.boolean
containsHeaders
(String key) The HTTP request headers.getAuth()
The request authentication.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.mergeAuth
(AttributeContext.Auth value) The request authentication.mergeTime
(com.google.protobuf.Timestamp value) The timestamp when the `destination` service receives the last byte of the request.putAllHeaders
(Map<String, String> values) The HTTP request headers.putHeaders
(String key, String value) The HTTP request headers.removeHeaders
(String key) The HTTP request headers.setAuth
(AttributeContext.Auth value) The request authentication.setAuth
(AttributeContext.Auth.Builder builderForValue) The request authentication.The HTTP request `Host` header value.setHostBytes
(com.google.protobuf.ByteString value) The HTTP request `Host` header value.The unique ID for a request, which can be propagated to downstream systems.setIdBytes
(com.google.protobuf.ByteString value) The unique ID for a request, which can be propagated to downstream systems.The HTTP request method, such as `GET`, `POST`.setMethodBytes
(com.google.protobuf.ByteString value) The HTTP request method, such as `GET`, `POST`.The HTTP URL path, excluding the query parameters.setPathBytes
(com.google.protobuf.ByteString value) The HTTP URL path, excluding the query parameters.setProtocol
(String value) The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".setProtocolBytes
(com.google.protobuf.ByteString value) The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic".The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request.setQueryBytes
(com.google.protobuf.ByteString value) 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.setReasonBytes
(com.google.protobuf.ByteString value) A special parameter for request reason.The HTTP URL scheme, such as `http` and `https`.setSchemeBytes
(com.google.protobuf.ByteString value) The HTTP URL scheme, such as `http` and `https`.setSize
(long value) The HTTP request size in bytes.setTime
(com.google.protobuf.Timestamp value) The timestamp when the `destination` service receives the last byte of the request.setTime
(com.google.protobuf.Timestamp.Builder builderForValue) The timestamp when the `destination` service receives the last byte of the request.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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.
-
setId
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"];
- Parameters:
value
- The id to set.- Returns:
- This builder for chaining.
-
clearId
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"];
- Returns:
- This builder for chaining.
-
setIdBytes
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"];
- Parameters:
value
- The bytes for id to set.- Returns:
- This builder for chaining.
-
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.
-
setMethod
The HTTP request method, such as `GET`, `POST`.
string method = 2 [json_name = "method"];
- Parameters:
value
- The method to set.- Returns:
- This builder for chaining.
-
clearMethod
The HTTP request method, such as `GET`, `POST`.
string method = 2 [json_name = "method"];
- Returns:
- This builder for chaining.
-
setMethodBytes
The HTTP request method, such as `GET`, `POST`.
string method = 2 [json_name = "method"];
- Parameters:
value
- The bytes for method to set.- Returns:
- This builder for chaining.
-
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
-
clearHeaders
-
removeHeaders
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"];
-
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
-
putHeaders
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"];
-
putAllHeaders
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"];
-
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.
-
setPath
The HTTP URL path, excluding the query parameters.
string path = 4 [json_name = "path"];
- Parameters:
value
- The path to set.- Returns:
- This builder for chaining.
-
clearPath
The HTTP URL path, excluding the query parameters.
string path = 4 [json_name = "path"];
- Returns:
- This builder for chaining.
-
setPathBytes
The HTTP URL path, excluding the query parameters.
string path = 4 [json_name = "path"];
- Parameters:
value
- The bytes for path to set.- Returns:
- This builder for chaining.
-
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.
-
setHost
The HTTP request `Host` header value.
string host = 5 [json_name = "host"];
- Parameters:
value
- The host to set.- Returns:
- This builder for chaining.
-
clearHost
The HTTP request `Host` header value.
string host = 5 [json_name = "host"];
- Returns:
- This builder for chaining.
-
setHostBytes
The HTTP request `Host` header value.
string host = 5 [json_name = "host"];
- Parameters:
value
- The bytes for host to set.- Returns:
- This builder for chaining.
-
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.
-
setScheme
The HTTP URL scheme, such as `http` and `https`.
string scheme = 6 [json_name = "scheme"];
- Parameters:
value
- The scheme to set.- Returns:
- This builder for chaining.
-
clearScheme
The HTTP URL scheme, such as `http` and `https`.
string scheme = 6 [json_name = "scheme"];
- Returns:
- This builder for chaining.
-
setSchemeBytes
The HTTP URL scheme, such as `http` and `https`.
string scheme = 6 [json_name = "scheme"];
- Parameters:
value
- The bytes for scheme to set.- Returns:
- This builder for chaining.
-
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.
-
setQuery
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"];
- Parameters:
value
- The query to set.- Returns:
- This builder for chaining.
-
clearQuery
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"];
- Returns:
- This builder for chaining.
-
setQueryBytes
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"];
- Parameters:
value
- The bytes for query to set.- Returns:
- This builder for chaining.
-
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.
-
setTime
The timestamp when the `destination` service receives the last byte of the request.
.google.protobuf.Timestamp time = 9 [json_name = "time"];
-
setTime
public AttributeContext.Request.Builder setTime(com.google.protobuf.Timestamp.Builder builderForValue) The timestamp when the `destination` service receives the last byte of the request.
.google.protobuf.Timestamp time = 9 [json_name = "time"];
-
mergeTime
The timestamp when the `destination` service receives the last byte of the request.
.google.protobuf.Timestamp time = 9 [json_name = "time"];
-
clearTime
The timestamp when the `destination` service receives the last byte of the request.
.google.protobuf.Timestamp time = 9 [json_name = "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.
-
setSize
The HTTP request size in bytes. If unknown, it must be -1.
int64 size = 10 [json_name = "size"];
- Parameters:
value
- The size to set.- Returns:
- This builder for chaining.
-
clearSize
The HTTP request size in bytes. If unknown, it must be -1.
int64 size = 10 [json_name = "size"];
- Returns:
- This builder for chaining.
-
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.
-
setProtocol
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"];
- Parameters:
value
- The protocol to set.- Returns:
- This builder for chaining.
-
clearProtocol
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"];
- Returns:
- This builder for chaining.
-
setProtocolBytes
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"];
- Parameters:
value
- The bytes for protocol to set.- Returns:
- This builder for chaining.
-
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.
-
setReason
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"];
- Parameters:
value
- The reason to set.- Returns:
- This builder for chaining.
-
clearReason
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"];
- Returns:
- This builder for chaining.
-
setReasonBytes
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"];
- Parameters:
value
- The bytes for reason to set.- Returns:
- This builder for chaining.
-
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.
-
setAuth
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"];
-
setAuth
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"];
-
mergeAuth
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"];
-
clearAuth
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"];
-