Class AttributeContext

  • All Implemented Interfaces:
    com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, AttributeContextOrBuilder, java.io.Serializable

    public final class AttributeContext
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AttributeContext.Api
      This message defines attributes associated with API operations, such as a network API request.
      static interface  AttributeContext.ApiOrBuilder  
      static class  AttributeContext.Auth
      This message defines request authentication attributes.
      static interface  AttributeContext.AuthOrBuilder  
      static class  AttributeContext.Builder
      This message defines the standard attribute vocabulary for Google APIs.
      static class  AttributeContext.Peer
      This message defines attributes for a node that handles a network request.
      static interface  AttributeContext.PeerOrBuilder  
      static class  AttributeContext.Request
      This message defines attributes for an HTTP request.
      static interface  AttributeContext.RequestOrBuilder  
      static class  AttributeContext.Resource
      This message defines core attributes for a resource.
      static interface  AttributeContext.ResourceOrBuilder  
      static class  AttributeContext.Response
      This message defines attributes for a typical network response.
      static interface  AttributeContext.ResponseOrBuilder  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage

        com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

        com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,​T extends java.lang.Object>
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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;
        Specified by:
        hasOrigin in interface AttributeContextOrBuilder
        Returns:
        Whether the origin field is set.
      • 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;
        Specified by:
        getOrigin in interface AttributeContextOrBuilder
        Returns:
        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;
        Specified by:
        getOriginOrBuilder in interface AttributeContextOrBuilder
      • 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;
        Specified by:
        hasSource in interface AttributeContextOrBuilder
        Returns:
        Whether the source field is set.
      • 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;
        Specified by:
        getSource in interface AttributeContextOrBuilder
        Returns:
        The source.
      • 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;
        Specified by:
        hasDestination in interface AttributeContextOrBuilder
        Returns:
        Whether the destination field is set.
      • 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;
        Specified by:
        getDestination in interface AttributeContextOrBuilder
        Returns:
        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;
        Specified by:
        getDestinationOrBuilder in interface AttributeContextOrBuilder
      • hasRequest

        public boolean hasRequest()
         Represents a network request, such as an HTTP request.
         
        .google.rpc.context.AttributeContext.Request request = 3;
        Specified by:
        hasRequest in interface AttributeContextOrBuilder
        Returns:
        Whether the request field is set.
      • hasResponse

        public boolean hasResponse()
         Represents a network response, such as an HTTP response.
         
        .google.rpc.context.AttributeContext.Response response = 4;
        Specified by:
        hasResponse in interface AttributeContextOrBuilder
        Returns:
        Whether the response 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;
        Specified by:
        hasResource in interface AttributeContextOrBuilder
        Returns:
        Whether the resource field is set.
      • 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;
        Specified by:
        getResource in interface AttributeContextOrBuilder
        Returns:
        The resource.
      • hasApi

        public boolean hasApi()
         Represents an API operation that is involved to a network activity.
         
        .google.rpc.context.AttributeContext.Api api = 6;
        Specified by:
        hasApi in interface AttributeContextOrBuilder
        Returns:
        Whether the api field is set.
      • getExtensionsList

        public java.util.List<com.google.protobuf.Any> getExtensionsList()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
        Specified by:
        getExtensionsList in interface AttributeContextOrBuilder
      • getExtensionsOrBuilderList

        public java.util.List<? extends com.google.protobuf.AnyOrBuilder> getExtensionsOrBuilderList()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
        Specified by:
        getExtensionsOrBuilderList in interface AttributeContextOrBuilder
      • getExtensionsCount

        public int getExtensionsCount()
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
        Specified by:
        getExtensionsCount in interface AttributeContextOrBuilder
      • getExtensions

        public com.google.protobuf.Any getExtensions​(int index)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
        Specified by:
        getExtensions in interface AttributeContextOrBuilder
      • getExtensionsOrBuilder

        public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder​(int index)
         Supports extensions for advanced use cases, such as logs and metrics.
         
        repeated .google.protobuf.Any extensions = 8;
        Specified by:
        getExtensionsOrBuilder in interface AttributeContextOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AttributeContext parseFrom​(java.nio.ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(java.nio.ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.ByteString data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.ByteString data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(byte[] data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(byte[] data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AttributeContext parseFrom​(java.io.InputStream input)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AttributeContext parseFrom​(java.io.InputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static AttributeContext parseDelimitedFrom​(java.io.InputStream input)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static AttributeContext parseDelimitedFrom​(java.io.InputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.CodedInputStream input)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static AttributeContext parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public AttributeContext.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public AttributeContext.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected AttributeContext.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<AttributeContext> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public AttributeContext getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder