Class AttributeContext.Request (2.40.0)

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

Static Fields

AUTH_FIELD_NUMBER

public static final int AUTH_FIELD_NUMBER
Field Value
Type Description
int

HEADERS_FIELD_NUMBER

public static final int HEADERS_FIELD_NUMBER
Field Value
Type Description
int

HOST_FIELD_NUMBER

public static final int HOST_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

METHOD_FIELD_NUMBER

public static final int METHOD_FIELD_NUMBER
Field Value
Type Description
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
Type Description
int

PROTOCOL_FIELD_NUMBER

public static final int PROTOCOL_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

REASON_FIELD_NUMBER

public static final int REASON_FIELD_NUMBER
Field Value
Type Description
int

SCHEME_FIELD_NUMBER

public static final int SCHEME_FIELD_NUMBER
Field Value
Type Description
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
Type Description
int

TIME_FIELD_NUMBER

public static final int TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AttributeContext.Request getDefaultInstance()
Returns
Type Description
AttributeContext.Request

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AttributeContext.Request.Builder newBuilder()
Returns
Type Description
AttributeContext.Request.Builder

newBuilder(AttributeContext.Request prototype)

public static AttributeContext.Request.Builder newBuilder(AttributeContext.Request prototype)
Parameter
Name Description
prototype AttributeContext.Request
Returns
Type Description
AttributeContext.Request.Builder

parseDelimitedFrom(InputStream input)

public static AttributeContext.Request parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AttributeContext.Request parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AttributeContext.Request parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AttributeContext.Request parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AttributeContext.Request parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AttributeContext.Request parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Request
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AttributeContext.Request> parser()
Returns
Type Description
Parser<Request>

Methods

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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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
Type Description
AttributeContext.Auth

The auth.

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
Type Description
AttributeContext.AuthOrBuilder

getDefaultInstanceForType()

public AttributeContext.Request getDefaultInstanceForType()
Returns
Type Description
AttributeContext.Request

getHeaders() (deprecated)

public Map<String,String> getHeaders()

Use #getHeadersMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
String

getHost()

public String getHost()

The HTTP request Host header value.

string host = 5;

Returns
Type Description
String

The host.

getHostBytes()

public ByteString getHostBytes()

The HTTP request Host header value.

string host = 5;

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for id.

getMethod()

public String getMethod()

The HTTP request method, such as GET, POST.

string method = 2;

Returns
Type Description
String

The method.

getMethodBytes()

public ByteString getMethodBytes()

The HTTP request method, such as GET, POST.

string method = 2;

Returns
Type Description
ByteString

The bytes for method.

getParserForType()

public Parser<AttributeContext.Request> getParserForType()
Returns
Type Description
Parser<Request>
Overrides

getPath()

public String getPath()

The HTTP URL path, excluding the query parameters.

string path = 4;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

The HTTP URL path, excluding the query parameters.

string path = 4;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for reason.

getScheme()

public String getScheme()

The HTTP URL scheme, such as http and https.

string scheme = 6;

Returns
Type Description
String

The scheme.

getSchemeBytes()

public ByteString getSchemeBytes()

The HTTP URL scheme, such as http and https.

string scheme = 6;

Returns
Type Description
ByteString

The bytes for scheme.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSize()

public long getSize()

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

int64 size = 10;

Returns
Type Description
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
Type Description
Timestamp

The time.

getTimeOrBuilder()

public TimestampOrBuilder getTimeOrBuilder()

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

.google.protobuf.Timestamp time = 9;

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the time field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AttributeContext.Request.Builder newBuilderForType()
Returns
Type Description
AttributeContext.Request.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AttributeContext.Request.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AttributeContext.Request.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AttributeContext.Request.Builder toBuilder()
Returns
Type Description
AttributeContext.Request.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException