Class AttributeContext (2.11.0)

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

DESTINATION_FIELD_NUMBER

public static final int DESTINATION_FIELD_NUMBER
Field Value
TypeDescription
int

EXTENSIONS_FIELD_NUMBER

public static final int EXTENSIONS_FIELD_NUMBER
Field Value
TypeDescription
int

ORIGIN_FIELD_NUMBER

public static final int ORIGIN_FIELD_NUMBER
Field Value
TypeDescription
int

REQUEST_FIELD_NUMBER

public static final int REQUEST_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_FIELD_NUMBER

public static final int RESOURCE_FIELD_NUMBER
Field Value
TypeDescription
int

RESPONSE_FIELD_NUMBER

public static final int RESPONSE_FIELD_NUMBER
Field Value
TypeDescription
int

SOURCE_FIELD_NUMBER

public static final int SOURCE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AttributeContext getDefaultInstance()
Returns
TypeDescription
AttributeContext

getDescriptor()

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

newBuilder()

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

newBuilder(AttributeContext prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<AttributeContext> parser()
Returns
TypeDescription
Parser<AttributeContext>

Methods

equals(Object obj)

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

The api.

getApiOrBuilder()

public AttributeContext.ApiOrBuilder getApiOrBuilder()

Represents an API operation that is involved to a network activity.

.google.rpc.context.AttributeContext.Api api = 6;

Returns
TypeDescription
AttributeContext.ApiOrBuilder

getDefaultInstanceForType()

public AttributeContext getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext

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
TypeDescription
AttributeContext.Peer

The destination.

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
TypeDescription
AttributeContext.PeerOrBuilder

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
NameDescription
indexint
Returns
TypeDescription
Any

getExtensionsCount()

public int getExtensionsCount()

Supports extensions for advanced use cases, such as logs and metrics.

repeated .google.protobuf.Any extensions = 8;

Returns
TypeDescription
int

getExtensionsList()

public List<Any> getExtensionsList()

Supports extensions for advanced use cases, such as logs and metrics.

repeated .google.protobuf.Any extensions = 8;

Returns
TypeDescription
List<Any>

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
NameDescription
indexint
Returns
TypeDescription
AnyOrBuilder

getExtensionsOrBuilderList()

public List<? extends AnyOrBuilder> getExtensionsOrBuilderList()

Supports extensions for advanced use cases, such as logs and metrics.

repeated .google.protobuf.Any extensions = 8;

Returns
TypeDescription
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
TypeDescription
AttributeContext.Peer

The origin.

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
TypeDescription
AttributeContext.PeerOrBuilder

getParserForType()

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

getRequest()

public AttributeContext.Request getRequest()

Represents a network request, such as an HTTP request.

.google.rpc.context.AttributeContext.Request request = 3;

Returns
TypeDescription
AttributeContext.Request

The request.

getRequestOrBuilder()

public AttributeContext.RequestOrBuilder getRequestOrBuilder()

Represents a network request, such as an HTTP request.

.google.rpc.context.AttributeContext.Request request = 3;

Returns
TypeDescription
AttributeContext.RequestOrBuilder

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
TypeDescription
AttributeContext.Resource

The resource.

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
TypeDescription
AttributeContext.ResourceOrBuilder

getResponse()

public AttributeContext.Response getResponse()

Represents a network response, such as an HTTP response.

.google.rpc.context.AttributeContext.Response response = 4;

Returns
TypeDescription
AttributeContext.Response

The response.

getResponseOrBuilder()

public AttributeContext.ResponseOrBuilder getResponseOrBuilder()

Represents a network response, such as an HTTP response.

.google.rpc.context.AttributeContext.Response response = 4;

Returns
TypeDescription
AttributeContext.ResponseOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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
TypeDescription
AttributeContext.Peer

The source.

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
TypeDescription
AttributeContext.PeerOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasApi()

public boolean hasApi()

Represents an API operation that is involved to a network activity.

.google.rpc.context.AttributeContext.Api api = 6;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the source field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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