Class AttributeContext.Request.Builder (2.37.1)

public static final class AttributeContext.Request.Builder extends GeneratedMessageV3.Builder<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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Request.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

build()

public AttributeContext.Request build()
Returns
TypeDescription
AttributeContext.Request

buildPartial()

public AttributeContext.Request buildPartial()
Returns
TypeDescription
AttributeContext.Request

clear()

public AttributeContext.Request.Builder clear()
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

clearAuth()

public AttributeContext.Request.Builder 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;

Returns
TypeDescription
AttributeContext.Request.Builder

clearField(Descriptors.FieldDescriptor field)

public AttributeContext.Request.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

clearHeaders()

public AttributeContext.Request.Builder clearHeaders()
Returns
TypeDescription
AttributeContext.Request.Builder

clearHost()

public AttributeContext.Request.Builder clearHost()

The HTTP request Host header value.

string host = 5;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearId()

public AttributeContext.Request.Builder 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;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearMethod()

public AttributeContext.Request.Builder clearMethod()

The HTTP request method, such as GET, POST.

string method = 2;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AttributeContext.Request.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

clearPath()

public AttributeContext.Request.Builder clearPath()

The HTTP URL path, excluding the query parameters.

string path = 4;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearProtocol()

public AttributeContext.Request.Builder 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;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearQuery()

public AttributeContext.Request.Builder 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;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearReason()

public AttributeContext.Request.Builder clearReason()

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

string reason = 12;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearScheme()

public AttributeContext.Request.Builder clearScheme()

The HTTP URL scheme, such as http and https.

string scheme = 6;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearSize()

public AttributeContext.Request.Builder clearSize()

The HTTP request size in bytes. If unknown, it must be -1.

int64 size = 10;

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

clearTime()

public AttributeContext.Request.Builder clearTime()

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Returns
TypeDescription
AttributeContext.Request.Builder

clone()

public AttributeContext.Request.Builder clone()
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

containsHeaders(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

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;

Returns
TypeDescription
AttributeContext.Auth

The auth.

getAuthBuilder()

public AttributeContext.Auth.Builder getAuthBuilder()

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;

Returns
TypeDescription
AttributeContext.Auth.Builder

getAuthOrBuilder()

public AttributeContext.AuthOrBuilder getAuthOrBuilder()

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;

Returns
TypeDescription
AttributeContext.AuthOrBuilder

getDefaultInstanceForType()

public AttributeContext.Request getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext.Request

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHeaders() (deprecated)

public Map<String,String> getHeaders()

Use #getHeadersMap() instead.

Returns
TypeDescription
Map<String,String>

getHeadersCount()

public int getHeadersCount()

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;

Returns
TypeDescription
int

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;

Returns
TypeDescription
Map<String,String>

getHeadersOrDefault(String key, String defaultValue)

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;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getHeadersOrThrow(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getHost()

public String getHost()

The HTTP request Host header value.

string host = 5;

Returns
TypeDescription
String

The host.

getHostBytes()

public ByteString getHostBytes()

The HTTP request Host header value.

string host = 5;

Returns
TypeDescription
ByteString

The bytes for host.

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;

Returns
TypeDescription
String

The id.

getIdBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for id.

getMethod()

public String getMethod()

The HTTP request method, such as GET, POST.

string method = 2;

Returns
TypeDescription
String

The method.

getMethodBytes()

public ByteString getMethodBytes()

The HTTP request method, such as GET, POST.

string method = 2;

Returns
TypeDescription
ByteString

The bytes for method.

getMutableHeaders() (deprecated)

public Map<String,String> getMutableHeaders()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getPath()

public String getPath()

The HTTP URL path, excluding the query parameters.

string path = 4;

Returns
TypeDescription
String

The path.

getPathBytes()

public ByteString getPathBytes()

The HTTP URL path, excluding the query parameters.

string path = 4;

Returns
TypeDescription
ByteString

The bytes for path.

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;

Returns
TypeDescription
String

The protocol.

getProtocolBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for protocol.

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;

Returns
TypeDescription
String

The query.

getQueryBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for query.

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;

Returns
TypeDescription
String

The reason.

getReasonBytes()

public ByteString getReasonBytes()

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

string reason = 12;

Returns
TypeDescription
ByteString

The bytes for reason.

getScheme()

public String getScheme()

The HTTP URL scheme, such as http and https.

string scheme = 6;

Returns
TypeDescription
String

The scheme.

getSchemeBytes()

public ByteString getSchemeBytes()

The HTTP URL scheme, such as http and https.

string scheme = 6;

Returns
TypeDescription
ByteString

The bytes for scheme.

getSize()

public long getSize()

The HTTP request size in bytes. If unknown, it must be -1.

int64 size = 10;

Returns
TypeDescription
long

The size.

getTime()

public Timestamp getTime()

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Returns
TypeDescription
Timestamp

The time.

getTimeBuilder()

public Timestamp.Builder getTimeBuilder()

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Returns
TypeDescription
Builder

getTimeOrBuilder()

public TimestampOrBuilder getTimeOrBuilder()

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Returns
TypeDescription
TimestampOrBuilder

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;

Returns
TypeDescription
boolean

Whether the auth field is set.

hasTime()

public boolean hasTime()

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Returns
TypeDescription
boolean

Whether the time field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAuth(AttributeContext.Auth value)

public AttributeContext.Request.Builder mergeAuth(AttributeContext.Auth value)

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;

Parameter
NameDescription
valueAttributeContext.Auth
Returns
TypeDescription
AttributeContext.Request.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AttributeContext.Request.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AttributeContext.Request.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

mergeFrom(AttributeContext.Request other)

public AttributeContext.Request.Builder mergeFrom(AttributeContext.Request other)
Parameter
NameDescription
otherAttributeContext.Request
Returns
TypeDescription
AttributeContext.Request.Builder

mergeTime(Timestamp value)

public AttributeContext.Request.Builder mergeTime(Timestamp value)

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AttributeContext.Request.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Request.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

putAllHeaders(Map<String,String> values)

public AttributeContext.Request.Builder putAllHeaders(Map<String,String> values)

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;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
AttributeContext.Request.Builder

putHeaders(String key, String value)

public AttributeContext.Request.Builder putHeaders(String key, String value)

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;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
AttributeContext.Request.Builder

removeHeaders(String key)

public AttributeContext.Request.Builder removeHeaders(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;

Parameter
NameDescription
keyString
Returns
TypeDescription
AttributeContext.Request.Builder

setAuth(AttributeContext.Auth value)

public AttributeContext.Request.Builder setAuth(AttributeContext.Auth value)

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;

Parameter
NameDescription
valueAttributeContext.Auth
Returns
TypeDescription
AttributeContext.Request.Builder

setAuth(AttributeContext.Auth.Builder builderForValue)

public AttributeContext.Request.Builder setAuth(AttributeContext.Auth.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueAttributeContext.Auth.Builder
Returns
TypeDescription
AttributeContext.Request.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Request.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

setHost(String value)

public AttributeContext.Request.Builder setHost(String value)

The HTTP request Host header value.

string host = 5;

Parameter
NameDescription
valueString

The host to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setHostBytes(ByteString value)

public AttributeContext.Request.Builder setHostBytes(ByteString value)

The HTTP request Host header value.

string host = 5;

Parameter
NameDescription
valueByteString

The bytes for host to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setId(String value)

public AttributeContext.Request.Builder setId(String value)

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;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setIdBytes(ByteString value)

public AttributeContext.Request.Builder setIdBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setMethod(String value)

public AttributeContext.Request.Builder setMethod(String value)

The HTTP request method, such as GET, POST.

string method = 2;

Parameter
NameDescription
valueString

The method to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setMethodBytes(ByteString value)

public AttributeContext.Request.Builder setMethodBytes(ByteString value)

The HTTP request method, such as GET, POST.

string method = 2;

Parameter
NameDescription
valueByteString

The bytes for method to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setPath(String value)

public AttributeContext.Request.Builder setPath(String value)

The HTTP URL path, excluding the query parameters.

string path = 4;

Parameter
NameDescription
valueString

The path to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setPathBytes(ByteString value)

public AttributeContext.Request.Builder setPathBytes(ByteString value)

The HTTP URL path, excluding the query parameters.

string path = 4;

Parameter
NameDescription
valueByteString

The bytes for path to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setProtocol(String value)

public AttributeContext.Request.Builder setProtocol(String value)

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;

Parameter
NameDescription
valueString

The protocol to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setProtocolBytes(ByteString value)

public AttributeContext.Request.Builder setProtocolBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for protocol to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setQuery(String value)

public AttributeContext.Request.Builder setQuery(String value)

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;

Parameter
NameDescription
valueString

The query to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setQueryBytes(ByteString value)

public AttributeContext.Request.Builder setQueryBytes(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. No decoding is performed.

string query = 7;

Parameter
NameDescription
valueByteString

The bytes for query to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setReason(String value)

public AttributeContext.Request.Builder setReason(String value)

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

string reason = 12;

Parameter
NameDescription
valueString

The reason to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setReasonBytes(ByteString value)

public AttributeContext.Request.Builder setReasonBytes(ByteString value)

A special parameter for request reason. It is used by security systems to associate auditing information with a request.

string reason = 12;

Parameter
NameDescription
valueByteString

The bytes for reason to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AttributeContext.Request.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

setScheme(String value)

public AttributeContext.Request.Builder setScheme(String value)

The HTTP URL scheme, such as http and https.

string scheme = 6;

Parameter
NameDescription
valueString

The scheme to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setSchemeBytes(ByteString value)

public AttributeContext.Request.Builder setSchemeBytes(ByteString value)

The HTTP URL scheme, such as http and https.

string scheme = 6;

Parameter
NameDescription
valueByteString

The bytes for scheme to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setSize(long value)

public AttributeContext.Request.Builder setSize(long value)

The HTTP request size in bytes. If unknown, it must be -1.

int64 size = 10;

Parameter
NameDescription
valuelong

The size to set.

Returns
TypeDescription
AttributeContext.Request.Builder

This builder for chaining.

setTime(Timestamp value)

public AttributeContext.Request.Builder setTime(Timestamp value)

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AttributeContext.Request.Builder

setTime(Timestamp.Builder builderForValue)

public AttributeContext.Request.Builder setTime(Timestamp.Builder builderForValue)

The timestamp when the destination service receives the last byte of the request.

.google.protobuf.Timestamp time = 9;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AttributeContext.Request.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Request.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides