Class AttributeContext.Request (2.8.3)

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
TypeDescription
int

HEADERS_FIELD_NUMBER

public static final int HEADERS_FIELD_NUMBER
Field Value
TypeDescription
int

HOST_FIELD_NUMBER

public static final int HOST_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

METHOD_FIELD_NUMBER

public static final int METHOD_FIELD_NUMBER
Field Value
TypeDescription
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
TypeDescription
int

PROTOCOL_FIELD_NUMBER

public static final int PROTOCOL_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
TypeDescription
int

REASON_FIELD_NUMBER

public static final int REASON_FIELD_NUMBER
Field Value
TypeDescription
int

SCHEME_FIELD_NUMBER

public static final int SCHEME_FIELD_NUMBER
Field Value
TypeDescription
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

TIME_FIELD_NUMBER

public static final int TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AttributeContext.Request getDefaultInstance()
Returns
TypeDescription
AttributeContext.Request

getDescriptor()

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

newBuilder()

public static AttributeContext.Request.Builder newBuilder()
Returns
TypeDescription
AttributeContext.Request.Builder

newBuilder(AttributeContext.Request prototype)

public static AttributeContext.Request.Builder newBuilder(AttributeContext.Request prototype)
Parameter
NameDescription
prototypeAttributeContext.Request
Returns
TypeDescription
AttributeContext.Request.Builder

parseDelimitedFrom(InputStream input)

public static AttributeContext.Request parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AttributeContext.Request parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AttributeContext.Request parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AttributeContext.Request parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AttributeContext.Request parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AttributeContext.Request parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AttributeContext.Request parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Request
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<AttributeContext.Request> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AttributeContext.AuthOrBuilder

getDefaultInstanceForType()

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

getHeaders()

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.

getParserForType()

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

getPath()

public String getPath()

The HTTP URL path.

string path = 4;

Returns
TypeDescription
String

The path.

getPathBytes()

public ByteString getPathBytes()

The HTTP URL path.

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

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

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AttributeContext.Request.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AttributeContext.Request.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException