public final class AttributeContext extends GeneratedMessageV3 implements AttributeContextOrBuilder
This message defines the standard attribute vocabulary for Google APIs.
An attribute is a piece of metadata that describes an activity on a network
service. For example, the size of an HTTP request, or the status code of
an HTTP response.
Each attribute has a type and a name, which is logically defined as
a proto message field in AttributeContext
. The field type becomes the
attribute type, and the field path becomes the attribute name. For example,
the attribute source.ip
maps to field AttributeContext.source.ip
.
This message definition is guaranteed not to have any wire breaking change.
So you can use it directly for passing attributes across different systems.
NOTE: Different system may generate different subset of attributes. Please
verify the system specification before relying on an attribute generated
a system.
Protobuf type google.rpc.context.AttributeContext
Static Fields
API_FIELD_NUMBER
public static final int API_FIELD_NUMBER
Field Value
DESTINATION_FIELD_NUMBER
public static final int DESTINATION_FIELD_NUMBER
Field Value
EXTENSIONS_FIELD_NUMBER
public static final int EXTENSIONS_FIELD_NUMBER
Field Value
ORIGIN_FIELD_NUMBER
public static final int ORIGIN_FIELD_NUMBER
Field Value
REQUEST_FIELD_NUMBER
public static final int REQUEST_FIELD_NUMBER
Field Value
RESOURCE_FIELD_NUMBER
public static final int RESOURCE_FIELD_NUMBER
Field Value
RESPONSE_FIELD_NUMBER
public static final int RESPONSE_FIELD_NUMBER
Field Value
SOURCE_FIELD_NUMBER
public static final int SOURCE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AttributeContext getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AttributeContext.Builder newBuilder()
Returns
newBuilder(AttributeContext prototype)
public static AttributeContext.Builder newBuilder(AttributeContext prototype)
Parameter
Returns
parseDelimitedFrom(InputStream input)
public static AttributeContext parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AttributeContext parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AttributeContext parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(CodedInputStream input)
public static AttributeContext parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(InputStream input)
public static AttributeContext parseFrom(InputStream input)
Parameter
Returns
Exceptions
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AttributeContext parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AttributeContext parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AttributeContext> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getApi()
public AttributeContext.Api getApi()
Represents an API operation that is involved to a network activity.
.google.rpc.context.AttributeContext.Api api = 6;
Returns
getApiOrBuilder()
public AttributeContext.ApiOrBuilder getApiOrBuilder()
Represents an API operation that is involved to a network activity.
.google.rpc.context.AttributeContext.Api api = 6;
Returns
getDefaultInstanceForType()
public AttributeContext getDefaultInstanceForType()
Returns
getDestination()
public AttributeContext.Peer getDestination()
The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop.
.google.rpc.context.AttributeContext.Peer destination = 2;
Returns
getDestinationOrBuilder()
public AttributeContext.PeerOrBuilder getDestinationOrBuilder()
The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop.
.google.rpc.context.AttributeContext.Peer destination = 2;
Returns
getExtensions(int index)
public Any getExtensions(int index)
Supports extensions for advanced use cases, such as logs and metrics.
repeated .google.protobuf.Any extensions = 8;
Parameter
Returns
getExtensionsCount()
public int getExtensionsCount()
Supports extensions for advanced use cases, such as logs and metrics.
repeated .google.protobuf.Any extensions = 8;
Returns
getExtensionsList()
public List<Any> getExtensionsList()
Supports extensions for advanced use cases, such as logs and metrics.
repeated .google.protobuf.Any extensions = 8;
Returns
getExtensionsOrBuilder(int index)
public AnyOrBuilder getExtensionsOrBuilder(int index)
Supports extensions for advanced use cases, such as logs and metrics.
repeated .google.protobuf.Any extensions = 8;
Parameter
Returns
getExtensionsOrBuilderList()
public List<? extends AnyOrBuilder> getExtensionsOrBuilderList()
Supports extensions for advanced use cases, such as logs and metrics.
repeated .google.protobuf.Any extensions = 8;
Returns
Type | Description |
List<? extends com.google.protobuf.AnyOrBuilder> | |
getOrigin()
public AttributeContext.Peer getOrigin()
The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the source
and the origin
must have the same content.
.google.rpc.context.AttributeContext.Peer origin = 7;
Returns
getOriginOrBuilder()
public AttributeContext.PeerOrBuilder getOriginOrBuilder()
The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the source
and the origin
must have the same content.
.google.rpc.context.AttributeContext.Peer origin = 7;
Returns
getParserForType()
public Parser<AttributeContext> getParserForType()
Returns
Overrides
getRequest()
public AttributeContext.Request getRequest()
Represents a network request, such as an HTTP request.
.google.rpc.context.AttributeContext.Request request = 3;
Returns
getRequestOrBuilder()
public AttributeContext.RequestOrBuilder getRequestOrBuilder()
Represents a network request, such as an HTTP request.
.google.rpc.context.AttributeContext.Request request = 3;
Returns
getResource()
public AttributeContext.Resource getResource()
Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.
.google.rpc.context.AttributeContext.Resource resource = 5;
Returns
getResourceOrBuilder()
public AttributeContext.ResourceOrBuilder getResourceOrBuilder()
Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.
.google.rpc.context.AttributeContext.Resource resource = 5;
Returns
getResponse()
public AttributeContext.Response getResponse()
Represents a network response, such as an HTTP response.
.google.rpc.context.AttributeContext.Response response = 4;
Returns
getResponseOrBuilder()
public AttributeContext.ResponseOrBuilder getResponseOrBuilder()
Represents a network response, such as an HTTP response.
.google.rpc.context.AttributeContext.Response response = 4;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSource()
public AttributeContext.Peer getSource()
The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.
.google.rpc.context.AttributeContext.Peer source = 1;
Returns
getSourceOrBuilder()
public AttributeContext.PeerOrBuilder getSourceOrBuilder()
The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.
.google.rpc.context.AttributeContext.Peer source = 1;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasApi()
Represents an API operation that is involved to a network activity.
.google.rpc.context.AttributeContext.Api api = 6;
Returns
Type | Description |
boolean | Whether the api field is set.
|
hasDestination()
public boolean hasDestination()
The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop.
.google.rpc.context.AttributeContext.Peer destination = 2;
Returns
Type | Description |
boolean | Whether the destination field is set.
|
hasOrigin()
public boolean hasOrigin()
The origin of a network activity. In a multi hop network activity,
the origin represents the sender of the first hop. For the first hop,
the source
and the origin
must have the same content.
.google.rpc.context.AttributeContext.Peer origin = 7;
Returns
Type | Description |
boolean | Whether the origin field is set.
|
hasRequest()
public boolean hasRequest()
Represents a network request, such as an HTTP request.
.google.rpc.context.AttributeContext.Request request = 3;
Returns
Type | Description |
boolean | Whether the request field is set.
|
hasResource()
public boolean hasResource()
Represents a target resource that is involved with a network activity.
If multiple resources are involved with an activity, this must be the
primary one.
.google.rpc.context.AttributeContext.Resource resource = 5;
Returns
Type | Description |
boolean | Whether the resource field is set.
|
hasResponse()
public boolean hasResponse()
Represents a network response, such as an HTTP response.
.google.rpc.context.AttributeContext.Response response = 4;
Returns
Type | Description |
boolean | Whether the response field is set.
|
hasSource()
public boolean hasSource()
The source of a network activity, such as starting a TCP connection.
In a multi hop network activity, the source represents the sender of the
last hop.
.google.rpc.context.AttributeContext.Peer source = 1;
Returns
Type | Description |
boolean | Whether the source field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AttributeContext.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AttributeContext.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AttributeContext.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions